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 (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