Cocoa in Carbon Question
Cocoa in Carbon Question
- Subject: Cocoa in Carbon Question
- From: Tom <email@hidden>
- Date: Tue, 9 Mar 2004 14:30:03 -0600
Hello,
I have a question about using Cocoa code in Carbon application. Apple
documentation says you have to make a separate bundle with Obj-C code
and wrap it with C-callable functions, then load that bundle in Carbon
app to obtain function pointers to those wrappers.
The documentation does not explicitly say why you have to do this.
Implicit explanation is that different event handling need to be
directed to different code modules. And indeed when out of curiosity I
linked Cocoa AppKit code directly into Carbon code (without going
though loadable bundle) my event handling was totally messed up.
However, when I used Obj-C Foundation-only stuff, which does not rely
on any type of event handling, I had a success of using Cocoa in Carbon
without messing anything.
So, after long introduction, my question is: do I need to go through
loadable bundle hassle to use Foundation-only Cocoa code in Carbon? If
it's a definitive "NO" for direct linking I would appreciate an
explanation why. I am aware of atorelease pools issues but this is
relatively easy to take care of.
I am posting this to both Carbon & Cocoa lists to increase my chances
of getting a good answer :-)
Thanks,
Tom
Abracode
_______________________________________________
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.