Le 11/03/2012 08:34, Ian Haywood a écrit : > 2012/3/11 Benoît Minisini<gam...@users.sourceforge.net>: > >> - 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 ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user