[Q] DependentsArray has weakreferences
Diego Gomez Deck
DiegoGomezDeck at ConsultAr.com
Sat Mar 9 18:19:33 UTC 2002
Hello....
>Diego,
>
>Views need models. Models do _not_ need views (at least that's the
>theory).
I'm not sure that model do not need views... if an object is not observed
by anyone the object will die...
>Thus if the last reference to a view goes away that view should
>go away without bothering the programmer to manually deregister.
Here the definition of "last reference" is not clear to me.... I can
consider that the last reference comes from the model....
>It appears to me that if the model needs your "views" then these no views
>but something different.
My problem appears because the dependents mechanism assume that you must
have other strong-reference to a view to work.... in most of the cases this
extra strong reference is the World... in my case this extra
strong-reference is in other image.
From my point of view, one object can observe other object without the
needing of a third one.
>And you may not expect the mechanism which was
>designed for views to work with it.
I think that you assume that view means gui-view....
>Cheers,
> - Andreas
Thanks for your answer,
Diego Gomez Deck
More information about the Squeak-dev
mailing list
|