Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa Dialog over DialogManager Dialog



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.