Have sheet delay until done?
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