We were presenting the users with lists and they needed to select one or more items from those lists.
It seems to me that the appropriate place for my %is_selected; is inside the code that presents the list to the user and lets them select one or more items. And that code should know how to return the list of selected items (that code might be encapsulated in a class, depending).
The problem with free'ing the %is_selected is just one symptom of a poor solution that doesn't scale. Consider if you need to select more than one set of servers. You only have one is_selected() method per object. But if you present the user with the opportunity to select a subset twice, then by putting the information about what they selected in a more appropriate place, there is no problem if you need multiple subsets selected (and this information is deleted when you are done with it).
- tye
In reply to Re: Maintaining State with Runtime Traits (where)
by tye
in thread Maintaining State with Runtime Traits
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |