Turning modal call into non-modal operation?
Turning modal call into non-modal operation?
- Subject: Turning modal call into non-modal operation?
- From: Per Persson <email@hidden>
- Date: Fri, 3 Jan 2003 15:15:37 +0100
Hi,
I'm trying to glue together some legacy code with a Cocoa GUI and I've
come across a situation where the old code needs feedback from the GUI.
The call I'm recieving is in principle
char * getCursor(int x, int y, int *finalX, int *finalY)
which expects a modal operation placing a marker at (x, y), allowing
the user to move it around and at the press of a key or mouse button
return the final position along with the key/button pressed.
Given that I don't want that kind of modal behaviour in the GUI, are
there any clean way of accomplishing that? My present idea is to have a
thread separate from the main thread that receives the getCursor call
and then initializing the input process and then wait for some kind of
"semaphore" to indicate that the user has ended the session and then
return. (The code issuing the call is already running in a different
thread, but it is not in my power to change the way it works.)
Is the above the "correct" solution to the problem, or is there a
smarter way?
TIA,
Per
_______________________________________________
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.