Re: COM on mac
Re: COM on mac
- Subject: Re: COM on mac
- From: Chris Hanson <email@hidden>
- Date: Mon, 13 Jan 2003 12:34:33 -0600
At 12:49 PM -0500 1/13/03, Gil Dror wrote:
I am wondering what technique is equivalent to COM in mac. I have
looked through Apple's guides but it doesn't seem to talk about this
aspect of Mac programming, maybe the solution is very obvious to a
mac user but I can't seem to get the way programs interact with each
other in OS X.
What this comes down to is a clash of terminology. You want to
communicate with other applications, so look for "inter-application
communication." You'll find all sorts of information on the Apple
Event Manager and AppleScript, which is how this is done on the
Macintosh.
okay, so I guess my questions boil down to this:
1. How do I expose a class for outside programs to access ? and then
how do I access the class from that program ?
Use and support Apple Events. Specifically, use and implement the
Apple Event Object Model, which is the common set of terminology
(nouns and verbs) used by AppleScript and AppleScript-aware
applications.
Cocoa makes it relatively easy to add support for this to your
applications, far, *far* easier than Carbon ever did (even with
PowerPlant). Look for information on writing scriptable applications.
Unless there's something I've missed, to send AppleEvents you'll
still need to use the Carbon Apple Event Manager API, which is plain
C. Unless of course you write an AppleScript instead and just
execute it from within your application. (Very easy to do.)
2. I know that using DLL's is not a common practice for the Mac but
does that mean you have all the functionality in the Executable
itself ?
Using shared libraries and frameworks is an extremely common practice
on the Macintosh. Again the problem is terminology; we don't call
them "DLLs", we call them "shared libraries" (old-school Mac and Unix
developers) or "frameworks" (NeXT and Mac OS X developers). Look in
/System/Library/Frameworks and /Library/Frameworks on your Macintosh
to see all the shared libraries Mac OS X developers can use.
One other thing about Macintosh developer terminology: We tend to
avoid acronyms, particularly pronounced ones. We never, ever say
"the application's GUI" (either spelling it out or pronouncing it
"gooey"); rather, we say "the application's human interface." And so
on. When looking for documentation this may help you out; searches
may go better if you spell things out rather than use acronyms.
Good luck!
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.
References: | |
| >COM on mac (From: Gil Dror <email@hidden>) |