• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: runModalForWindow, best solution to modal session
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: runModalForWindow, best solution to modal session
      • From: Alexander Reichstadt <email@hidden>
References: 
 >runModalForWindow, best solution to modal session (From: Alexander Reichstadt <email@hidden>)

  • Prev by Date: Re: NSTextField input validation
  • Next by Date: CoreData with OutlineView collapses items on fetch
  • Previous by thread: runModalForWindow, best solution to modal session
  • Next by thread: Re: runModalForWindow, best solution to modal session
  • Index(es):
    • Date
    • Thread