Re: runModalForWindow, best solution to modal session
Re: runModalForWindow, best solution to modal session
- Subject: Re: runModalForWindow, best solution to modal session
- From: Keary Suska <email@hidden>
- Date: Tue, 13 Jan 2009 11:44:14 -0700
On Jan 13, 2009, at 10:44 AM, Alexander Reichstadt wrote:
Hi,
in my app I call runModalForWindow: in a class method initializer --
the class is a NSWindowController subclass-- from a controller of a
sheet. Please, disregard UI Guidelines, it's a highly customized app
and this approach used as per specific request.
+ (id)selectItem
{
KSingleItemSelectorController *newSelector =
[[KSingleItemSelectorController alloc]
initWithWindowNibName:@"SingleItemSelector"];
(void)[newSelector window];
NSLog(@"The window is nil, see: %@",[newSelector window]);
[NSApp runModalForWindow:[newSelector window]];
id keepThis = newSelector.returnValue;
[newSelector release];
return keepThis;
}
<snipped>
Is the class of the File's Owner of the nib set to
KSingleItemSelectorController, and its window outlet set? If so, do
you override -initWithWindowNibName:? The implementation may matter.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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