discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Autosizing subviews


From: Andreas Höschler
Subject: Re: Autosizing subviews
Date: Mon, 5 Dec 2005 09:52:35 +0100


However, I noted a difference between MacOSX and GNustep. If you call
setFrame: on a NSView in MacOSX this will call setFrameSize:. On GNUstep
this is not the case. If sublcasses overwrite setFrameSize: with extra
functionality, this won't work on GNUstep while it does on MacOSX. May
be we should change the setFrame: and setFrameSize: implementations of
NSView, NSScrollView,.. to behave like MacOSX does. Any thoughts?


It would not be to hard to change setFrame: to call the two other
methods (setFrameSize: and setFrameOrigin:), but wouldn't in that case
two notifications be send?

It wouldn't be hard to avoid this, would it?

And what happens on MacOSX when you overwrite
setFrame:, but call setFrameSize:? Will your own code be called as well?

I conclude overwriting setFrame:, setFrameSize: is bad coding style. One is better off observing the notification instead. I agree that no change in the code is required here.

Regards,

  Andreas








reply via email to

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