Skip to content

Commit 48226fe

Browse files
committed
Item accessor
Access to indexed items has been added through the Items property.
1 parent 2830b63 commit 48226fe

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/CSVArrayList.cls

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,19 @@ End Property
203203
''' </summary>
204204
Public Property Get items() As Variant
205205
Attribute items.VB_Description = "Gets an array with all the Items from the current instance."
206-
If CurrentIndex >= 0 Then
207-
Dim tmpResult() As Variant
208-
tmpResult = Buffer
209-
If MaxIndex <> CurrentIndex Then
210-
ReDim Preserve tmpResult(0 To CurrentIndex)
206+
If Not P_INDEXING Then
207+
If CurrentIndex >= 0 Then
208+
Dim tmpResult() As Variant
209+
tmpResult = Buffer
210+
If MaxIndex <> CurrentIndex Then
211+
ReDim Preserve tmpResult(0 To CurrentIndex)
212+
End If
213+
items = tmpResult
214+
End If
215+
Else
216+
If IndexedCurrentIndex >= 0 Then
217+
items = IndexedItems
211218
End If
212-
items = tmpResult
213219
End If
214220
End Property
215221

0 commit comments

Comments
 (0)