Re: How to tell what API is used
Re: How to tell what API is used
- Subject: Re: How to tell what API is used
- From: Nicholas Riley <email@hidden>
- Date: Fri, 25 Jun 2004 03:19:48 -0500
- Mail-followup-to: Mark Patterson <email@hidden>, Apple Cocoa Dev-List <email@hidden>
On Fri, Jun 25, 2004 at 05:16:59PM +1000, Mark Patterson wrote:
>
How can you work out whether an app you're running is Cocoa or Carbon
>
or java Cocoa? Is there something you can look at in the bundle? or
>
some utility that tests for this?
First, be aware that all Cocoa apps use Carbon, for example for menus
and printing. It's possible to mix Cocoa, Carbon and Java in almost
every imaginable combination. Java 1.3.x on Mac OS X is Carbon based;
Java 1.4.x is Cocoa based.
That said, here are some ways to distinguish Cocoa and Carbon UI
components:
- If a text field has a double-width gray insertion point, or if
selecting all the text doesn't highlight the entire interior of the
field, it's Carbon (MLTE); if you select antialiased text in a text
field and it doesn't select cleanly, it's Carbon (TextEdit).
- In a window with a default button, if you click on the window
background and the button stops pulsing, it's Carbon.
- If a sheet is opaque (as opposed to translucent), it's Carbon.
- If a floating window/palette/utility window's title bar has
only a close button (not minimize/zoom ones, even disabled), or has
the title bar on the side, or has a very thin title bar with no
title, it's likely Carbon.
- If an application has separators or checkmarks in its dock menu,
it's Carbon.
OTOH, I wish the above differences would go away, and I imagine some
will in future OS releases.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
_______________________________________________
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.