Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A very simple test' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A very simple test
Authored by: sabi on Jul 05, '02 10:35:09PM
Posted this last time the topic came up, but people seem to have no memories around here... :-) Hold down the mouse button in a dialog box or window with a default (blue, pulsating) button. If the button stops animating, then it's Carbon, otherwise it's Cocoa.

[ Reply to This | # ]
A very simple test
Authored by: Rosyna on Jul 06, '02 12:31:28AM
This is sadly right in every app I've tried. It's also true if you press the help key in Cocoa apps, the cursor changes to a question mark. If you can click an immediately drag text, it's a Carbon Application. If you have to click, hold, wait, then drag, it's a Cocoa application. If you can immediately drag a proxy icon, it's Cocoa and if not, it's Carbon (the opposite of text dragging)

When I say Cocoa and Carbon application, I mean the main event loop is NSRunApplication (the cocoa event loop) or WaitNextEvent or RunApplicationEventLoop for Carbon.

In the future applications may be able to mix these, in that case, you could probably only tell if a single window is carbon or cocoa.

[ Reply to This | # ]
A very simple test
Authored by: Anonymous on Jul 11, '02 11:39:44AM

Unfortunately, it's even worse than that. You can hold down the mouse on virtually any UI element anywhere in the operating system and the Aqua default button will stop pulsating in Carbon apps. Single-threaded crap or what!? :-)



[ Reply to This | # ]