[Pharo-project] NewInspector does not work well with delegated collections
jaayer at zoho.com
Mon Nov 29 21:38:32 CET 2010
Enclosed is a fileout of a sample collection named DelegatedSet that works by delegating to an instance of Set stored in an instance variable. It implements the basic protocol Collection requires, including #add:, #remove:ifAbsent: and #do: as well as some additional messages, all through delegation. Create an instance of it and then inspect that instance with NewInsepctor, and you will notice the "Elements" item does not work. Nothing happens when you click it. To inspect the elements, you need to click "set," the instance variable containing the Set, and then inspect that object further. Apparently, unless you override one or more messages under the extension category *Newinspector, NewInspector will not know how to inspect your collection properly. Worse, as soon as you do implement those methods, unless you change their category, they will now be considered part of the *Newinspector package rather than the package your collection belongs to and will not be saved along with the collection.
I think at a minimum, any collection understanding #do: and #size should be inspectable by NewInspector.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1673 bytes
Desc: not available
More information about the Pharo-project