Re: connections and the nib lifecycle

2008-05-22 Thread Torsten Curdt
On May 22, 2008, at 05:27, Chris Hanson wrote: On May 21, 2008, at 11:00 AM, Vijay Malhan wrote: But the problem is still open for discussion. Is there any differences in sequence of events occurring while loading of Nib between Tiger and Leopard platforms? There really should not be, at

Re: connections and the nib lifecycle

2008-05-21 Thread Chris Hanson
On May 21, 2008, at 11:00 AM, Vijay Malhan wrote: But the problem is still open for discussion. Is there any differences in sequence of events occurring while loading of Nib between Tiger and Leopard platforms? There really should not be, at least not like this. As I explained in my resp

Re: connections and the nib lifecycle

2008-05-21 Thread Chris Hanson
On May 21, 2008, at 9:05 AM, Torsten Curdt wrote: I have a class that extends NSWindowController. - (void) test:(NSString*)string { [textField setStringValue:string]; NSLog(@"textField=%@", textField); int ret = [NSApp runModalForWindow:[self window]]; NSLog(@"textField=%@", t

Re: connections and the nib lifecycle

2008-05-21 Thread Jonathan Hess
The documentation for awakeFromNib is correct. Are you sure these events are occurring in the order you think they are? If the interface isn't already loaded, awakeFromNib should be called from within the call to 'window' from 'test:' I would expect the order of the log message to be someth

Re: connections and the nib lifecycle

2008-05-21 Thread Jack Repenning
On May 21, 2008, at 11:00 AM, Vijay Malhan wrote: But the problem is still open for discussion. Is there any differences in sequence of events occurring while loading of Nib between Tiger and Leopard platforms? All UI-elements should be initialized by the time call reaches - (void)awakeFromN

Re: connections and the nib lifecycle

2008-05-21 Thread Vijay Malhan
Yes you are right. If we see this as an optimization enhancement, it completely make sense to have things work like this. But my point is that this behavior is not in-sync with the Leopard framework documentation (XCode 3.0) and Tiger implementation. Following is extract from the Mac OS X 1

Re: connections and the nib lifecycle

2008-05-21 Thread Torsten Curdt
On May 21, 2008, at 20:00, Vijay Malhan wrote: But the problem is still open for discussion. Is there any differences in sequence of events occurring while loading of Nib between Tiger and Leopard platforms? All UI-elements should be initialized by the time call reaches - (void)awakeFromNib

Re: connections and the nib lifecycle

2008-05-21 Thread Vijay Malhan
But the problem is still open for discussion. Is there any differences in sequence of events occurring while loading of Nib between Tiger and Leopard platforms? All UI-elements should be initialized by the time call reaches - (void)awakeFromNib. This is ensured to happen on Mac OS X 10.4. Yo

Re: connections and the nib lifecycle

2008-05-21 Thread Torsten Curdt
...actually with this new lazy loading feature code like this - (IBAction) showPreferences:(id)sender { if (!preferencesController) { preferencesController = [[PreferencesController alloc] init]; } [preferencesController showWindow:self]; } could probably just go away and bec

Re: connections and the nib lifecycle

2008-05-21 Thread Torsten Curdt
On May 21, 2008, at 19:21, Vijay Malhan wrote: Are you on Leopard? Yepp! This behavior should not be there on Tiger. I faced similar problem on Leopard with NSTableView. It seems in Leopard, nib is loaded, with lazy-loading kind of approach. The controls are not initialized until the wi

Re: connections and the nib lifecycle

2008-05-21 Thread Vijay Malhan
Are you on Leopard? This behavior should not be there on Tiger. I faced similar problem on Leopard with NSTableView. It seems in Leopard, nib is loaded, with lazy-loading kind of approach. The controls are not initialized until the window, on which the controls are hosted, is not referenced.

connections and the nib lifecycle

2008-05-21 Thread Torsten Curdt
I have a class that extends NSWindowController. I instantiate and call it like this MyWindowController *controller = [[MyWindowController alloc] init]; [controller test:@"test"]; The NIB has the textField connected. Here is the (simplified) implementation of the controller. - (id) init