Re: Cocoa dialog in CarbonLib App
Re: Cocoa dialog in CarbonLib App
- Subject: Re: Cocoa dialog in CarbonLib App
- From: Milton Sagen <email@hidden>
- Date: Sat, 23 Sep 2006 19:19:27 -0700
Are you calling NSApplicationLoad()? It wasn't clear in your original
post whether you were or not. From the docs: "You typically call this
before calling other Cocoa code in a plug-in loaded into a primarily
Carbon application."
On Sep 23, 2006, at 13:44, Eric Schlegel wrote:
On Sep 23, 2006, at 1:29 PM, Sanford Selznick wrote:
I'm having the following problems:
1. The window behind mine (owned by HotSync) doesn't get updates
while mine is open.
Probably HotSync Manager is a WaitNextEvent-based app, and if
you're using [NSApplication runModalForWindow] to run your dialog,
then the HotSync Manager event loop is not running and isn't
getting a chance to receive EventRecords.
The only way to fix this would be to leave HotSync Manager's event
loop in control. That means you can't call runModalForWindow; you
need to just create your window and then return control back to the
app. This might just work for free. You might also need to call
[NSWindow windowRef] to get the WindowRef for the modal dialog and
set its modality to kWindowModalityAppModal explicitly with the
SetWindowModality Carbon API.
You could hide the HotSync window and then show it again after your
plug-in completes. There are a number of Photoshop plug-ins that do
this, including some of the ones from the company where I work,
although our reason for doing so is different than yours. If you want
to try this I'd suggest doing it in your CFM/Mach-o bridge rather
than in the Cocoa plug-in itself. For the code to do this look at the
routines GetWindowList, GetNextWindow, and ShowHide in MacWindows.h.
Milt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden