Re: CocoaInCarbon + runModalForWindow glitch
Re: CocoaInCarbon + runModalForWindow glitch
- Subject: Re: CocoaInCarbon + runModalForWindow glitch
- From: Takashi Mochizuki <email@hidden>
- Date: Tue, 22 Jan 2008 22:45:43 +0900
Qi san,
Thank you for your quick reply.
I would try it. I never thought of such idea.
Takashi Mochizuki
On 2008/01/22, at 15:53, Constantine wrote:
mochi san,
The following code may not solve your problem perfectly, but hope
it can give you some idea:
WindowRef parentWindowRef; //parentWindowRef is your parent carbon
window, of type WindowRef
NSWindow * parentWindow = [[NSWindow alloc]
initWithWindowRef:parentWindowRef]; //change carbon window into
cocoa window, of type NSWindow *
[parentWindow addChildWindow:childWindow ordered:NSWindowAbove]; //
childWindow is your child cocoa window, of type NSWindow *
//...
[NSApp runModalForWindow:childWindow];
//...
[parentWindow removeChildWindow:childWindow];
=============================================
Qi Liu
E-Mail: email@hidden
--Stay Hungry. Stay Foolish.
--You've got to find what you love.
=============================================
_______________________________________________
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