|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Cocoa NSApp and Tcl/Tk Carbon conflictsHi, As I've explained in the previous thread about Embeding an NSView in Tk, I'm using gstreamer to do some video conferencing which provides us with an NSView.. So what I ended up doing was to create an NSWindow and put the NSView in it.. this is causing me some problems with Tk.. here are the issues I have :
I have to handle the Cocoa runloop myself so I set a timer and handle the events with [NSApp nextEventMatchingMask:untilDate:inMode:dequeue: ] method, then use [NSApp sendEvent:] to send the event to my window so they can process them.. the problem is that it looks like the events are shared between the Cocoa and Carbon runloops, so when my function gets an event, Tk misses it, and when Tk gets an event, my code misses it.. this causes some kind of race between my code and Tk, which causes a random race between my windows in which either the Cocoa window or the Tk windows are not getting notified of my mouse pressed, so I sometimes can't focus on a window, etc...
Do you have any idea on how to solve this ? The second issue I have is that as soon as I create the NSApp, when clicking on the dock icon for aMSN, aMSN doesn't get notified anymore that the dock was clicked, so I'm unable to restore my main window... Do you have any idea on how to reset that so that Carbon/Tk gets notified that the dock has been clicked ?
Finally, there are some other smaller issues, like the fact that I keep having two window borders with 'focus' in it, the Tk Carbon focused window and the previously focused Cocoa window (or the other way around), as well as my NSWindows not appearing in the list of Windows in the menubar, and I can't Ctrl-` to cycle through them...
Anyone has enough Cocoa/Tk knowledge to help me with that ? p.s.: yes I know about the Tk 8.5 Cocoa backport, but I don't want to use that since I want to keep 10.3.9 compatibility support for aMSN
Thanks, KaKaRoTo
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
Re: Cocoa NSApp and Tcl/Tk Carbon conflicts> p.s.: yes I know about the Tk 8.5 Cocoa backport, but I don't want to > use that since I want to keep 10.3.9 compatibility support for aMSN KaKaRoTo, Did you look at this document? http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/CarbonCocoaDoc.html#//apple_ref/doc/uid/10000193 It discussed ways to integrate Cocoa GUI elements in a Carbon app, and is not limited to HICocoaView. Some of these strategies might work for you if you want to preserve 10.3.9 compat. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tcl-mac mailing list tcl-mac@... https://lists.sourceforge.net/lists/listinfo/tcl-mac |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |