Re: Newbie (to Cocoa) questions
Re: Newbie (to Cocoa) questions
- Subject: Re: Newbie (to Cocoa) questions
- From: <email@hidden>
- Date: Thu, 7 Mar 2002 20:43:02 -0000
Jeff Shulman <email@hidden> said:
>
We're starting a new implementation of our product (current a
>
PowerPlant Carbon app). In addition to the app it consists of a
>
rather extensive cross-platform C++ framework for our core code.
>
PowerPlant isn't really keeping up with all the OSX Aqua/CarbonEvent
>
stuff as much as I would like (say like using sheets). So we have
>
three choices:
>
>
1) Continue with PowerPlant and either hope they catch up or
>
implement missing pieces ourselves;
>
2) Ditch PowerPlant and write a full Carbon app ourselves;
>
3) Use ObjC++/Cocoa as our front end (assuming we can drop pre-OSX support).
Number 2 seems like the least cost-effective solution. Surely implementing
the missing parts yourself would be easier than completely ditching
PowerPlant.
>
Most of our cross-platform framework stuff is using CoreFoundation.
>
One question is going between CF* stuff and NS* stuff (like strings).
>
I know that NSString for example uses CFString but can I simply cast
>
them back and forth (my ideal dream) or do they need to be converted
>
to some intermediate form? I did search the archives for this answer
>
but never saw a straight reply. At the very least it would be nice if
>
either initializers for the NS* stuff can take a CF* or Apple
>
provided some library to do this.
NSString* and CFStringRef are interchangable, an example of "toll-free
bridging." Unfortunately, this is currently not documented very well; the
most complete reference is in the Mac OS X 10.1 Developer Release Notes for
the Foundation Framework, which can be found at:
http://developer.apple.com/techpubs/macosx/ReleaseNotes/Foundation.html
There is an explanation and a list of types that have this property near the
bottom of the notes. A couple of types that have been added since are
mentioned further up.
>
Next I assume everything needs to be compiled as Mach-O. We currently
>
use (and export to third parties) CFM shared libraries. I guess we
>
would also now have to provide/use a Framework? One problem I see is
>
that we currently provide a single binary CFM shared library (in a
>
bundle) which contains several merged sub-libraries. It doesn't look
>
like you can do this with a Framework unless you use an Umbrella
>
Framework. Alas the docs I see don't really go into Umbrella
>
Frameworks and specifically say that third parties shouldn't use them.
The library stuff is beyond my expertise, so I'll have to let someone else
answer it.
I personally came to the conclusion, for one of my Carbon apps, that some of
the Carbon interface stuff to the new OS X features are such a pain to use
that it might be easier to just rewrite the stuff in Cocoa. On the other
hand, if you have a LOT of GUI code to rewrite, it might be faster (even if
not fun) to just go ahead and do the missing features in Carbon. At any rate,
it would be feasible to redo in Cocoa (if you can get a positve answer to the
library problem).
- Dennis D.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.