Re: NSWindow reference remains null after window did load (SOLVED)

2009-07-29 Thread Daniel Child
No, the syntax was right. The problem mysteriously disappeared when I altered the timing of the method to redraw the table, including the time data is loaded. Thanks for your suggestions. On Jul 28, 2009, at 8:38 PM, Andy Lee wrote: Just to be sure -- your method is numberOfRowsInTableView:,

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Andy Lee
Just to be sure -- your method is numberOfRowsInTableView:, not numberOfRowsInTableView, right? You mentioned you'd tried copying working method declarations, so I suspect that's not the problem, but I figured I'd double-check just in case *you* were calling it somewhere you'd forgotten about

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
The correct number, a value obtained from the model. On Jul 28, 2009, at 3:02 PM, cocoa-dev-requ...@lists.apple.com wrote: The only datasource method to get called is numberOfRowsInTableView. What number is it returning? --Andy ___ Cocoa-dev mai

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Quincey Morris
On Jul 28, 2009, at 11:04, Daniel Child wrote: The only datasource method to get called is numberOfRowsInTableView. The others do not get called. I rechecked syntax (even tried copying method sig from another project that works), rechecked connections for the outlets (File's Owner to the ta

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Andy Lee
On Jul 28, 2009, at 2:04 PM, Daniel Child wrote: The only datasource method to get called is numberOfRowsInTableView. What number is it returning? --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Actually, once I have init'd the window controller and set up the model data, I call showWindow on the controller. Unchecking visible at launch doesn't seem to make any difference. On Jul 28, 2009, at 11:47 AM, Graham Cox wrote: Visible at launch is checked (ON) Which is almost never wha

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Thanks for confirming this. On Jul 28, 2009, at 11:43 AM, Graham Cox wrote: Not only are they redundant, this is almost certainly your bug. Objects in a nib are real objects. Therefore you have two of them, both of the same class. Normally File's Owner is the window controller and this is

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
I decided the nib was maybe corrupt from my having dragged things from another project onto it. So I started with a fresh xib, got rid of the redundant object (as pointed out by Graham Cox and yourself) and voila: I have references to the tableview and the window. But it's still not working

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Graham Cox
On 29/07/2009, at 1:39 AM, Daniel Child wrote: Visible at launch is checked (ON) Which is almost never what you want. Windows should generally be loaded on demand by the app under the direction of their window controller. A window visible at launch won't necessarily even have a control

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Graham Cox
On 29/07/2009, at 1:31 AM, Daniel Child wrote: Which brings up another question: do I need the "object" (blue cube) at all in the nib if the file's owner is of the same class and presumably represents the same object. Are they redundant? Not only are they redundant, this is almost certainl

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
That would have been a good guess, but that's not it. Visible at launch is checked (ON). On Jul 28, 2009, at 3:13 AM, cocoa-dev-requ...@lists.apple.com wrote: This came up in another chat I had today. In that case, the window was not set to be visible at launch, so the system deferred actual

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Dave Carrigan
On Jul 28, 2009, at 8:31 AM, Daniel Child wrote: Which brings up another question: do I need the "object" (blue cube) at all in the nib if the file's owner is of the same class and presumably represents the same object. Are they redundant? They are completely different things. The blue cu

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Sorry, I misled you. There is a controller object and File's owner. File's owner's class is set to the window controller subclass. The window outlets for both of the win controller and file's owner point to the window itself. Which brings up another question: do I need the "object" (blue cu

Re: NSWindow reference remains null after window did load

2009-07-27 Thread Randall Meadows
On Jul 27, 2009, at 8:39 PM, Daniel Child wrote: I have a master controller loading a window controller subclass, but for some reason, I cannot get a pointer to the window loaded in the XIB file. I've looked at every connection, and I've also tested the order by of method calls. In the wi

Re: NSWindow reference remains null after window did load

2009-07-27 Thread Graham Cox
On 28/07/2009, at 12:39 PM, Daniel Child wrote: I have a master controller loading a window controller subclass, but for some reason, I cannot get a pointer to the window loaded in the XIB file. I've looked at every connection, and I've also tested the order by of method calls. In the wi

NSWindow reference remains null after window did load

2009-07-27 Thread Daniel Child
I have a master controller loading a window controller subclass, but for some reason, I cannot get a pointer to the window loaded in the XIB file. I've looked at every connection, and I've also tested the order by of method calls. In the window controller's init: [self window] yields nothin