[Q] DependentsArray has weakreferences
Ned Konz
ned at bike-nomad.com
Sat Mar 9 17:40:11 UTC 2002
On Saturday 09 March 2002 08:39 am, Diego Gomez Deck wrote:
> The question is: Why dependents are weak-references? In my point of view,
> this make no sense.... I want that views are alive meanwhile the model is
> alive.... if I don't want this, I can use #removeDependent:
>
> I found that this functionality was changed in the changeset
> 3701WeakObjectFields-ar dated 11 February 2001.
Because most of the time you don't want to worry about doing removeDependent:
all the time.
If you want different behavior, just pre-set the dependents to be a non-weak
collection:
self myDependents: OrderedCollection new.
You may also want/need to re-implement myDependents: (see Model for an
example) so that it doesn't use DependentsFields.
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|