Re: Carbon sheet making my Cocoa window unmovable
Re: Carbon sheet making my Cocoa window unmovable
- Subject: Re: Carbon sheet making my Cocoa window unmovable
- From: m <email@hidden>
- Date: Tue, 28 Sep 2004 13:03:01 -0500
On Sep 28, 2004, at 10:15 AM, Chris Eplett wrote:
[problems hosting a Carbon based plugin that expects a Carbon window]
I have found that a window created by Cocoa and a window created using
Carbon are only marginally interchangeable. I had a devil of a time
getting Audio Unit UIs to draw and function correctly in an NSWindow
and just couldn't get it right. In the end I used Carbon to create a
window and setup the proper Carbon event handlers, and plugged some
more holes here and there in my Cocoa code. The window ends up looking
to Cocoa like a NSCarbonWindow, which despite evidently being a
subclass of NSWindow, does not inherit all behaviors automatically. In
particular, you have to make arrangements in your code to correctly
handle the Close command.
The bottom line is that, assuming the plug-in is not doing anything
wrong and can't be fixed anyway, you may have better luck making your
application window a Carbon window, even if you have to do extra work
to get it to work correctly. Another trick (a kind of gross one at
that, but major apps are shipping with this hack) is to have a Carbon
window "nested" in your NSWindow and attach your plug-in to that. See
<file://localhost/Developer/Documentation/CoreAudio/AudioUnits/
CarbonViewCocoaWindow.rtfd/>
Other possibly useful links:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CarbonCocoaDoc/>
_murat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden