There is a bug in the Collection class that makes it behave different then the VB class
When using For Each the vb class return en iterator for the values, but the Jacabo Framework version return the keyset.
This is the Jabaco implementation.
|
Source code
|
1
2
3
|
Public Synchronized Function Iterator() As java#util#Iterator
Iterator = myObjectList.keySet().iterator()
End Function
|
This make my old VB code run.
|
Source code
|
1
2
3
|
Public Synchronized Function Iterator() As java#util#Iterator
Iterator = myObjectList.values.iterator()
End Function
|
I also laborated with
|
Source code
|
1
|
myObjectList.entrySet().iterator()
|
, but run in to a problem. Entry is a inner class of java.util.Map and i was unable to access it from Jabaco java#util#Map#Entry does not work... Does anyone know how if a inner class can be used inside Jacabo?
I also laborated with exporting the Values as a property, but encountered another bug. When i use
|
Source code
|
1
|
For Each o in Data.Values
|
the ".Values" part is ignored and the Iterator of the Data object (Collection instance) is called. This is important as I am going to suggest adding " Keys and Entries r/o properties that gives access to keySet and entrySet.
|
Source code
|
1
2
3
|
Public Synchronized Property Get Values As java#util#Collection
Values = myObjectList.values
End Property
|