runModalSession in Cocoa plugin for Carbon app does not return
runModalSession in Cocoa plugin for Carbon app does not return
- Subject: runModalSession in Cocoa plugin for Carbon app does not return
- From: Alexander Shmelev <email@hidden>
- Date: Sun, 9 Nov 2008 12:58:27 +0300
Hello,
I have following code in my Cocoa plug-in application:
NSModalSession session = [NSApp beginModalSessionForWindow:theWindow];
for (;;) {
if ([NSApp runModalSession:session] != NSRunContinuesResponse)
break;
[self doSomeWork];
}
I use modal sessions for displaying dialog with progress indicator and
"cancel" button.
When I run my plug-in under Carbon application, it halts on [NSApp
runModalSession] and [self doSomeWork] is not called at all. When I
click "cancel" button on my dialog, [NSApp runModalSession] returns !=
NSRunContinuesResponse and execution of "for (;;)" block finished.
How can I fix this?
NSApplicationLoad() does not help.
In Cocoa applications my plug-in works without problems. This issue
only with Carbon applications.
BR, Alexander.
_______________________________________________
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