• 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
Have sheet delay until done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Have sheet delay until done?


  • Subject: Have sheet delay until done?
  • From: Chase Meadors <email@hidden>
  • Date: Tue, 1 Sep 2009 21:50:12 -0500

I have the following method:

- (void)runNewItemSheet {

	[NSApp runSheet: modalForWindow....];

}

Then I call it in this manner

- (void)someMethod {

	[myClass runNewItemSheet];

id item = [myClass readyNewItem];
//item is nil because -runNewItemSheet has already returned after just starting the sheet


}

the class keeps the "readyNewItem" property updated according to what happens with the sheet. The problem is, the -runNewItemSheet method is returning right after starting the sheet. What I want is for it to wait until the didEnd selector is called to return from the - runNewItemSheet method. That way, "readyNewItem" will be properly assigned and not nil.

Is there any way I can accomplish this while still allowing the panel to work (IBActions etc.) but not return from the original calling method? I'm drawing a blank here.

Thanks for any help.
_______________________________________________

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: Have sheet delay until done?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Changes in KVO behavior on SL?
  • Next by Date: Re: Have sheet delay until done?
  • Previous by thread: Re: Changes in KVO behavior on SL?
  • Next by thread: Re: Have sheet delay until done?
  • Index(es):
    • Date
    • Thread