[Pharo-project] Set with nil
nick.ager at gmail.com
Fri May 20 06:08:23 EDT 2011
> You may want the collection from which you build a menu to be a Set because
> you don't want to have repeated entries in a menu, and you'd want nil to be
> there if your field can be empty. When the menu items are automatically
> generated, it'd be nice to be able to do Whatever buildMenuFrom:
> (myCollection asSet add: nil; yourself).
In this particular case you could model your "do nothing" menu option using
a special-case pattern - http://martinfowler.com/eaaCatalog/specialCase.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev