Re: Initializing NSWindow with Carbon window
Re: Initializing NSWindow with Carbon window
- Subject: Re: Initializing NSWindow with Carbon window
- From: Kyle Sluder <email@hidden>
- Date: Mon, 31 Jan 2011 00:18:11 -0800
On Sun, Jan 30, 2011 at 11:45 PM, Andrew James <email@hidden> wrote:
> I've done some investigating and still getting the behavior that the window does
> not display from the code below
>
> Interestingly, if you look at the two ShowWindow/SelectWindow pairs. I will see
> the window when the first one is uncommented only. I will not see the window
> when the second set is uncommented only. ODD. Don't know if this provides any
> insight.
>
> WindowRef carbonWindow = carbonBuilder.GetProduct();
>
> // If these are only Show/Select uncommented, window will display
> //ShowWindow( carbonWindow );
> //SelectWindow( carbonWindow );
>
> NSWindow *wrapper = [ [ NSWindow alloc ] initWithWindowRef: carbonWindow ];
>
> // If these are only Show/Select uncommented, window will NOT display
> //ShowWindow( carbonWindow );
> //SelectWindow( carbonWindow );
I have two observations:
1. Why not move entirely to Cocoa for your UI, rather than continuing
to build a Carbon UI and then wrapping it in a Cocoa window?
2. Is does not surprise me that the system doesn't like you making
Carbon window calls on a window once it's been wrapped by a Cocoa
window.
--Kyle Sluder
_______________________________________________
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