discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSView viewDidMoveToWindow


From: Richard Frith-Macdonald
Subject: Re: NSView viewDidMoveToWindow
Date: Thu, 25 Aug 2005 09:06:11 +0100

On 2005-08-23 10:13:43 +0100 Stéphane Goujet <stephane.goujet@kat.fi> wrote:

> Hello,
> 
>   is this method known to work or to be broken ?

It is implemented to do nothing.

>   The problem I have is that, for a view which is a subview of a subview of 
> [...] of a window, this method is called only once with GNUStep, when it is 
> added to its superview, but it is not called anymore later, when its 
> superview is added to another superview, etc., and when the last superview is 
> added to the window.
>   So, if I write in my view code :
> 
> -(void) viewDidMoveToWindow {
>       printf("window=%p\n", [self window]);
> }
> 
> I will only get 1 line of result :
> window=(null)
> 
> With Cocoa, I will get :
> window=0x0
> window=0x0
> window=0x0
> window=0x0
> window=0x52a730
> 
> which is the result I expect.

 ... the problem was with the code calling it, which wasn't calling it for 
subviews.
I've changed the code in CVS to call -viewDidMoveToWindow on subviews, as this 
appears to be the correct behavior.





reply via email to

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