views:

87

answers:

1

I am trying to display wait cursor (spinning rainbow wheel) by using "QDDisplayWaitCursor" function, but I get a warning that "QDDisplayWaitCursor" is deprecated, however everything runs fine but I would like to replace it with proper alternative of this function but I didnt find any google result and also in apple docs.

+3  A: 

The best thing to do is to use something else1:

The spinning wait cursor is displayed automatically by the window server when an application cannot handle all of the events it receives. If an application does not respond for about 2 to 4 seconds, the spinning wait cursor appears. You should try to avoid situations in your application in which the spinning wait cursor will be displayed.

Instead use progress indicators, in a window- or application-modal way if neccessary.

Georg Fritzsche
Thanks for your answer, but I am using web service calls to server, when it is fetching the data, there is no progress as such, its just like a wait hour glass or just to show user some animation that it is doing something. This is like, almost on every window and every button there is a web service call, it does not suite my application design to have some progress indication.
Akash Kava
@Akash: There are [indeterminate progress indicators](http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/ProgIndic/Tasks/IndeterProgIndic.html#//apple_ref/doc/uid/20000113-CJCBJJJJ) for that. The main problem with the spinning wait cursor is that users will think of your app as broken if it is shown for a bit too long - it indicates that the app doesn't respond anymore, not that it is busy.
Georg Fritzsche
If you read my previous comment, I said that indeterminate progress indicators are not possible in the application the way it is designed, I need simple hour glass notification, and an momentory alert for user to show something is happening, in iphone it has a status bar animation on the top. But in desktop i think i have to make a special window that will pop up for 3-4 seconds when there is a web service call, but it is annoying the way multiple calls are made.
Akash Kava
@Akash: I did read it. You don't have to make it a seperate window/panel if that doesn't fit, you can e.g. use a spinning progress indicator like any browser on OSX does.
Georg Fritzsche
I got it, but its still difficult, there is too much of code to write in wiring up everything, there are so many views, nested views where things happen and having one progress indicator somewhere on main window requires me to connecting lot of code. Anyway its unnecessary restriction by apple, every face has two eyes, one nose, to ears, but still every face is different, software is just like that, thats why I love windows that you get lot of customization, anyway thanks for your help and I am just ignoring this warning for now.
Akash Kava
Akash Kava: Adding a progress indicator (of any form) and hooking it up is not hard. For a spinner, create it in IB, uncheck “Display when stopped”, and then start its animation when you send the data request and stop its animation when the response arrives or fails. Total lines of code needed: Three. Making an indeterminate progress bar is only slightly harder (instead of hiding it when the response arrives or fails, you'd want to set it to determinate and 100%).
Peter Hosey