[Gambas-user] IDE feature request: viewing collection-like objects
Benoît Minisini
gambas at ...1...
Sat Mar 17 03:08:55 CET 2012
Le 11/03/2012 08:34, Ian Haywood a écrit :
> 2012/3/11 Benoît Minisini<gambas at ...1...>:
>
>> - If there is a _get() method that takes an integer, and if there is a
>> Count property, then I can display the object like an array.
>>
>> - If there is a _get() method that takes a string, if there is a Count
>> property, and if there is a Keys property that returns all keys in the
>> object, OR both a _next() method and a Key property that returns the key
>> of the last read value, then I can display the object like a collection.
>>
>> What do you think about that?
> Yes that sounds like exactly the functionality we are looking for.
>
> Ian
>
Can you try the revision #4558?
Your class will be displayed like a collection if:
- It has a Count property that returns the number of elements.
- It has a _next() method that enumerates the collection. That method is
not so easy to write!
- It has a _get() method that takes a string argument (the key) and
returns the value associated with the key.
- It has a Key property that returns the key of the last enumerated element.
Tell me if you have any problem with it.
Regards,
--
Benoît Minisini
More information about the User
mailing list