[SOLVED] Re: Sheet comes up disabled on second showing
[SOLVED] Re: Sheet comes up disabled on second showing
- Subject: [SOLVED] Re: Sheet comes up disabled on second showing
- From: Graham Cox <email@hidden>
- Date: Sat, 28 Nov 2009 21:28:33 +1100
On 27/11/2009, at 12:32 PM, Graham Cox wrote:
> I have a straightforward sheet containing a table and some buttons. First time I show it, it comes up fine and works as it should. All subsequent times, the whole interface is disabled except for the default button, so I can close it but I can't do anything in it. I'm not using bindings and the code is very straightforward:
Never mind - it was a straightforward error on my part (not surprisingly).
Knowing that windows are loaded lazily, I was initialising a subcontroller (for handling the table, which is shared with another UI elsewhere) from the -windowDidLoad method, which is only called on the first load of the window. On subsequent loads, it isn't called so the subcontroller was not passed the reference to the data model, so had nil, which is its cue to grey out all the controls.
Simply fixed - sorry for the noise.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden