discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: forwardInvocation problem


From: Richard Frith-Macdonald
Subject: Re: forwardInvocation problem
Date: Wed, 13 Mar 2002 08:31:26 +0000

On Wednesday, March 13, 2002, at 07:55 AM, Björn Gohla wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 13 March 2002 07:57, Richard Frith-Macdonald wrote:
I can't really tell for sure from your code how it's even supposed to
work.

I think your whole approach may be doomed.
i suspected that.

Your class needs to be a subclass of GSVbox or GSHbox ... you are trying
to
make it act like either using delegation, and that just won't work.
i want it to behave like one of them at a time, after all that is what
NSProxy does, is'nt it?

Yes, and you *could* make it work ... but only with a great deal of
effort and inefficiency.

The view hierarchy is built up of views referring to each other ...
but all other classes in the hierarchy would refer to your proxy
object, while the real box object would not know about this, and
would be expecting them to be holding references to it directly -
so the various methods used to manipulate the hierarchy would not
work simply by forwarding all methods to the real object, and you
would need to re-implement some of them in your class.

Also, in the display system, views can reference ivars of other
views directly ... this also would not work of course.  You could
probably get round that by making your class a subclass of NSView,
and copying the state from the real box object into the proxy object
whenever the real one changes its ivars.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]