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

    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,
    [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


    Do you anyone have any idea for more smart implementation? I would
    pretty appreciate to your comments.

    Takashi Mochizuki
previous month january 2008 next month
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today