Cocoa Dialog over DialogManager Dialog
Cocoa Dialog over DialogManager Dialog
- Subject: Cocoa Dialog over DialogManager Dialog
- From: Takashi Mochizuki <email@hidden>
- Date: Tue, 15 Jan 2008 10:13:50 +0900
Hello,
I have a problem with Cocoa-In-Carbon Integration.
I am building QuickTime Component - Compressor Component, which has a
optional settings dialog.
This winter, I have moved to Cocoa bundled binding based dialog,
using Coco-In-Carbon structure. It runs pretty well under Cocoa App,
But on Carbon app, I have found minor event handling problem.
//
Traditional QT API set uses stacking DialogManager Interfaces, thus
they are Dialog-over-dialog-over-dialog-o...
When I uses Carbon nib with RunAppModalLoopForWindow(), it runs over
current carbon dialog, and handle event
correctly.
But When I move to Cocoa, [NSWindow runModalForWindw:], there are
some issues.
Some carbon apps does hang when I show Cocoa Dialog, both window does
not accept any event.
I have resolved this by setting higher window level in Cocoa bundle,
like:
[Dialog setLevel:NSMainMenuWindowLevel];
[Dialog makeKeyAndOrderFront:self];
int ret = [NSApp runModalForWindow:Dialog];
[Dialog orderOut:self];
This could make my cocoa window run correctly inside carbon app, but
there is still one thing.
Lower layer carbon dialog Does Accept window switching, but does not
activate. So that it could cover active cocoa dialog, (Lower cocoa
window still accept keybd events, so I can close it by pressing esc
key.)
//
Do you anyone have any idea for more smart implementation? I would
pretty appreciate to your comments.
Takashi Mochizuki
_______________________________________________
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