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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to