Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Hourglass in long operations (project loading)

<< < (7/8) > >>

killerbot:

--- Quote ---Another note:
Why not add the hourglass at the beginning of the function?
It would be only 1 line of code and all switch cases would be affected while now some are skipped.
--- End quote ---

I assume you are talking about the OpenGeneric. If so, that's not a good place, since the DnD will call OpenGeneric for every file, that means N times creation/destruction of the glass hour. The glass hour is being constructed though in the Dnd before' all the files are being submitted to OpenGeneric.

iw2nhl:

--- Quote from: killerbot on July 28, 2006, 12:36:28 am ---I assume you are talking about the OpenGeneric.

--- End quote ---
Yes, I forgot to say that ;-)


--- Quote from: killerbot on July 28, 2006, 12:36:28 am ---If so, that's not a good place, since the DnD will call OpenGeneric for every file, that means N times creation/destruction of the glass hour. The glass hour is being constructed though in the Dnd before' all the files are being submitted to OpenGeneric.

--- End quote ---

I try to explain better what I mean:
- place the houglass call in both OpenGeneric() and OnDropFiles()
- in OnDropFiles() is ok
- in OpenGeneric() place it at the first lines
- no problem if the function is called several times in OpenGeneric() by OnDropFiles()
From wxWidgets docs (http://www.wxwindows.org/manuals/2.6.3/wx_dialogfunctions.html#wxbeginbusycursor):
These two calls (wxBeginBusyCursor and wxEndBusyCursor) can be nested, and a counter ensures that only the outer calls take effect.
And note that wxBusyCursor works by calling wxBeginBusyCursor in the constructor, and wxEndBusyCursor in the destructor

For the other problem (about OnDropFiles()), it seems to be caused by:

--- Code: ---        Freeze();
        Thaw();

--- End code ---
because removing them, it is fixed.

thomas:

--- Quote ---1) the hourglass is called, but never shown
--- End quote ---
Not true. It is shown for a short time, but it is reset soon after. We're not doing it, so send your complaints to Julian Smart.
Moving the call to the beginning of the function does not change the behaviour.


--- Quote ---2) the GUI freezes more than before
--- End quote ---
That's what Freeze() does. However, it avoids the flickering due to overdraw, and it makes loading the dropped files significantly faster, which is one thing you complained about in the first place.


--- Quote ---3) while the files are being loaded, you can click on the window below C::B
--- End quote ---
Don't do that then.

iw2nhl:

--- Quote from: thomas on July 28, 2006, 09:47:51 am ---
--- Quote ---1) the hourglass is called, but never shown
--- End quote ---
Not true. It is shown for a short time, but it is reset soon after. We're not doing it, so send your complaints to Julian Smart.
Moving the call to the beginning of the function does not change the behaviour.

--- End quote ---
I don't know Julian Smart, who is him?


--- Quote from: thomas on July 28, 2006, 09:47:51 am ---
--- Quote ---2) the GUI freezes more than before
--- End quote ---
That's what Freeze() does. However, it avoids the flickering due to overdraw, and it makes loading the dropped files significantly faster, which is one thing you complained about in the first place.

--- End quote ---
I never complained about slow loading, but about no feedback during the slow loading. They are different things ;-)


--- Quote from: thomas on July 28, 2006, 09:47:51 am ---
--- Quote ---3) while the files are being loaded, you can click on the window below C::B
--- End quote ---
Don't do that then.

--- End quote ---
Probably this was not clear, but this is a bug (probably of wxWidgets).
If I have Firefox loaded below C::B and I move the mouse over C::B window, I see the text which is "highlighted" by the mouse on the HTML page of Firefox (animated images too).
Anyway I think that Freeze() and Thaw() give more troubles than what they solve.

jmccay:

--- Quote from: iw2nhl on July 28, 2006, 09:24:00 pm ---

--- Quote from: thomas on July 28, 2006, 09:47:51 am ---
--- Quote ---1) the hourglass is called, but never shown
--- End quote ---
Not true. It is shown for a short time, but it is reset soon after. We're not doing it, so send your complaints to Julian Smart.
Moving the call to the beginning of the function does not change the behaviour.

--- End quote ---
I don't know Julian Smart, who is him?

--- End quote ---

  Just so you know that should be: "who is he".  Julian Smart is the creator of wxWidegts (formerly wxWindows).  I have emailed him a couple of times, and I even got replies.  You might try addressing the behaivor/problem in the wxWidgets forums.

jmccay

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version