Re: Cocoa and future
Re: Cocoa and future
- Subject: Re: Cocoa and future
- From: David Duncan <email@hidden>
- Date: Fri, 20 Feb 2009 08:44:54 -0800
On Feb 20, 2009, at 8:35 AM, john smith wrote: Then I need some way for that view to communicate with my C++ code. Then that C++ code need to communicate with some other cocoa code, because drawing functions no longer are support in carbon.
I'm unclear on what you mean here. If you mean Quickdraw, that technology has been barely supported for most of Mac OS X, and formally deprecated in 10.4. You should be using Core Graphics (aka Quartz) which is fully supported in both the Carbon and Cocoa environments.
When your ready to draw your buffer, wrap it in a CGImageRef, draw the image and release the image again. Do you see what I mean? There's absolutely no gain for me in cocoa, only extra work. Nothing of what I do on a daily basis uses the OS calls, so it doesn't matter if they're a hassle... If they are an obstacle, then they're an obstacle that I've already crossed..
If you've been following Apple's recommendations for event handling and graphics, then you are already 90% of the way there.
Carbon Events for event handling mirror into the event system in Cocoa fairly well (except you don't have to install event handlers, you just override methods). Graphics should be using Quartz, which is available to both Carbon & Cocoa applications for drawing. File handling and a lot of other non-GUI stuff doesn't need to change at all.
If your not using Quartz, then your graphics work will be harder. If your not using Carbon Events, then your event work will be harder. But neither of these have been the recommended methods either. -- Reality is what, when you stop believing in it, doesn't go away. Failure is not an option. It is a privilege reserved for those who try.
David Duncan
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden