For once I actually should have "cut-and-paste":

NSWindow *wrapper = [ [ NSWindow alloc ] initWithWindowRef: 
carbonBuilder.GetProduct() ];
[ wrapper makeKeyAndOrderFront: self];

I did have the sender being sent correctly.  Window still does not show with 
this approach. Nice catch though.

I'm going to keep trying. Going to see if makeKeyAndOrderFront is causing any 
Carbon Events to be generated for the wrapped window.

I may also take the route of subclassing NSWindowController with something like 
WrappedCarbonWindowController and look into subclassing methods like 
showWindow. 
 Implementing a window delegate my also help.  I've got options that I'm going 
to explore.

Cheers,
--aj


________________________________
From: Graham Cox <graham....@bigpond.com>
To: Andrew James <andrew_a_ja...@yahoo.com>
Cc: list-cocoa-dev <cocoa-dev@lists.apple.com>
Sent: Sun, January 30, 2011 3:04:38 AM
Subject: Re: Initializing NSWindow with Carbon window


On 30/01/2011, at 9:17 PM, Andrew James wrote:

> [ window makeKeyAndOrderFront ];


This should be [window makeKeyAndOrderFront:nil];

(or you could pass a valid sender, though I suspect it's ignored)

--Graham
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to