Re: Force display of spinning busy cursor?
Re: Force display of spinning busy cursor?
- Subject: Re: Force display of spinning busy cursor?
- From: Tomas Zahradnicky <email@hidden>
- Date: Mon, 12 May 2003 07:55:42 +0200
Cocoa seems to automatically display the spinning color-wheel "busy cursor"
after a few seconds whenever the processing of an event doesn't complete
quickly. This is nice, but there are some situations where I know the event
processing will take a bit of time and I'd like to force the busy cursor to
display immediately upon initiation of the event processing (i.e. at the
beginning of the action method of a control's target). Is there an API,
public or private, to force the immediately display of the busy cursor? I
haven't found one.
(I know there are better ways of handling the event processing with worker
threads, etc. to keep the GUI responsive but I'm currently dealing with some
legacy code where that simply isn't a short-term option.)
Thanks,
-John DeNisi
Hello John,
to display the spinning wheel cursor just call
QDDisplayWaitCursor(TRUE);. The following text is from QuickDraw's
header file:
/*
In Mac OS X, developers should be able to turn the WaitCursor
(spinning wheel)
on and off. QDDisplayWaitCursor() keeps track of nested calls.
Passing FALSE will resume automatic wait cursor operation.
Call this function only from an application in the foreground.
*/
/*
* QDDisplayWaitCursor()
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available in CarbonLib 1.x, is available
on Mac OS X version 10.0 and later
* Mac OS X: in version 10.0 and later
*/
EXTERN_API_C( void )
QDDisplayWaitCursor(Boolean forceWaitCursor);
-Tomas
--
# Ing. Tomas Zahradnicky, Jr.
# The Czech Technical University
# Dept of Computer Science, FEE-CTU Prague
_______________________________________________
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.