• 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: runModalSession in Cocoa plugin for Carbon app does not return
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: runModalSession in Cocoa plugin for Carbon app does not return


  • Subject: Re: runModalSession in Cocoa plugin for Carbon app does not return
  • From: Alexander Shmelev <email@hidden>
  • Date: Sun, 9 Nov 2008 16:33:08 +0300

I have TWAIN Data Source written with Cocoa. When I use it from Image Capture, everything is ok.
But when I try to use it from GIMP (Carbon) or Photoshop CS3 (Carbon), [NSApp runModalSession] is called once, but returns only when [NSApp stopModal] called.


But I expect that [NSApp runModalSession] is called, then it processes some pending events, and then returns, so my code can call [self doSomeWork], then loop repeat.

BR, Alexander

On 09.11.2008, at 13:37, Colin Barrett wrote:

What exactly do you mean by "Cocoa plug-in application"?

-Colin

On Sun, Nov 9, 2008 at 1:58 AM, Alexander Shmelev <email@hidden> wrote:
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


_______________________________________________

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


References: 
 >runModalSession in Cocoa plugin for Carbon app does not return (From: Alexander Shmelev <email@hidden>)
 >Re: runModalSession in Cocoa plugin for Carbon app does not return (From: "Colin Barrett" <email@hidden>)

  • Prev by Date: Can't get CABasicAnimation to explicitly animate "frame" property of CALayer
  • Next by Date: NSAttributedString in NSAffineTransform
  • Previous by thread: Re: runModalSession in Cocoa plugin for Carbon app does not return
  • Next by thread: Can't get CABasicAnimation to explicitly animate "frame" property of CALayer
  • Index(es):
    • Date
    • Thread