Cocoa in Carbon troubles - cursors and windows
Cocoa in Carbon troubles - cursors and windows
- Subject: Cocoa in Carbon troubles - cursors and windows
- From: Alberto Ricci <email@hidden>
- Date: Sun, 18 Apr 2004 15:57:59 +0200
Hello everybody,
I have a Cocoa window in my Carbon app, which is loaded from a bundle
just like the sample code says one should do.
And - just as in the sample code - mouse tracking is screwed up. When
the mouse is over a text field, it does not alway turn into an i-beam
cursor, and similarly it does not always get reset to an arrow cursor
when exiting the field.
A similar behavior can be observed with other mouse-tracking controls
such as NSTableViews (when resizing columns) and so on.
I suspect that mouse moved events are sent to only one of either
Carbon or Cocoa, and whoever gets the event first, eats it without
forwarding it to the other if not handled. But it's just an idea, I
don't know if this is what is really happening.
Has anybody observed similar behavior?
Does anybody know of a fix?
A similar, probably related issue, is the following: my Carbon app
registers for processing kHICommandAbout commands, but when the user
chooses the "About" menu item, this command is properly sent to the
Carbon application if and only if the frontmost window is a Carbon -
and not a Cocoa - window! If a Cocoa window is in front, the standard
about box provided by Cocoa is shown, and the kHICommandAbout command
is never received by the Carbon application.
It seems to be an arbitration problem between Carbon and Cocoa - is
there any way I can solve this in my app? Would it be possible to
tell NSApp to ignore about window requests so that they are not
handled by Cocoa and, instead, flow through to my Carbon app?
Thank you very much!
Alberto Ricci.
_______________________________________________
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.