Page 7 of 30

Posted: Wed Oct 18, 2006 2:53 pm
by gnozal
Update

Changes :
- improved eGrid compatibility
- added unicode / unicode+threadsafe versions

Posted: Wed Oct 18, 2006 3:17 pm
by srod
gnozal wrote:Update

Changes :
- improved eGrid compatibility
- added unicode / unicode+threadsafe versions
Works perfectly. egrid can now track the sort and can notify applications when the sort is complete, thus enabling them to reinstate the selection box etc.

Thanks Gnozal.

Posted: Wed Oct 18, 2006 6:23 pm
by rw
Deleted


rw

Posted: Thu Oct 19, 2006 7:38 am
by gnozal

Posted: Tue Oct 24, 2006 4:48 am
by mskuma
srod wrote:Works perfectly. egrid can now track the sort and can notify applications when the sort is complete, thus enabling them to reinstate the selection box etc.

Thanks Gnozal.
A question for either gnozal or srod about tracking the sort. For lengthy sorts, is it possible to show the user a progress bar indication of the sort progress?

Posted: Tue Oct 24, 2006 9:20 am
by srod
Yes, but it would most likely have to come from the sort callback proc. :)

Posted: Tue Oct 24, 2006 10:09 am
by mskuma
Yeah I could see that - ideally I was hoping to not have to wipe out what's already working well there. Thanks for the reply. Maybe I might just put something up there between the start & end sort message.

Posted: Tue Oct 24, 2006 10:19 am
by srod
No I mean the sort callback proc within PureLVSort.

Posted: Tue Oct 24, 2006 10:20 am
by gnozal
mskuma wrote:A question for either gnozal or srod about tracking the sort. For lengthy sorts, is it possible to show the user a progress bar indication of the sort progress?
AFAIK no.
I use the #LVM_SORTITEMS message, and in the sorting callback (pointed by pfnCompare) there is no way to know the progression.

Posted: Tue Oct 24, 2006 10:27 am
by srod
I was thinking of some kind of estimate. You can obviously keep a track of how many comparisons are made - with the absolute max being n(n-1)/2 etc. Course, I do not know which sort algorithm Windows employs here. :)

Posted: Tue Oct 24, 2006 10:34 am
by gnozal
srod wrote:I was thinking of some kind of estimate. You can obviously keep a track of how many comparisons are made - with the absolute max being n(n-1)/2 etc. Course, I do not know which sort algorithm Windows employs here. :)
It's probably some king of quicksort (?), but I don't know if there is a way to predict the number of comparisons needed : if the list is already sorted, i = few, if the list is in random order, i = max. And tracking the progression could slow it down.

Posted: Tue Oct 24, 2006 10:40 am
by srod
Fair enough. :)

Posted: Sat Oct 28, 2006 1:01 am
by mskuma
Regarding my earlier posting about giving the user some feedback (e.g. progress) during a long sort, I'm resorting to using a 'cheap way' i.e. changing a status bar icon. I thought maybe I could animate it with the aid of a timer (timeSetEvent) triggered to start and end with egrid messages, but it seems no window updates are available or done during the sort (which is understandable) because I can't see any animation (only the first frame is shown). I was wondering if you can suggest another way to achieve an animated effect during a long sort, otherwise I think perhaps an ok way to give feedback is to do a popup or maybe better still, change the statusbar icon using egrid messages. If any other suggestions, I'd be glad to hear. Thanks.

Posted: Sat Oct 28, 2006 8:00 am
by gnozal
mskuma wrote:Regarding my earlier posting about giving the user some feedback (e.g. progress) during a long sort, I'm resorting to using a 'cheap way' i.e. changing a status bar icon. I thought maybe I could animate it with the aid of a timer (timeSetEvent) triggered to start and end with egrid messages, but it seems no window updates are available or done during the sort (which is understandable) because I can't see any animation (only the first frame is shown). I was wondering if you can suggest another way to achieve an animated effect during a long sort, otherwise I think perhaps an ok way to give feedback is to do a popup or maybe better still, change the statusbar icon using egrid messages. If any other suggestions, I'd be glad to hear. Thanks.
Maybe you could try to animate the icon in an thread ?

Posted: Sat Oct 28, 2006 8:46 am
by mskuma
gnozal wrote:Maybe you could try to animate the icon in an thread ?
Hmm.. I thought using timeSetEvent runs in its own thread.. maybe that's just the timer and not the function it calls.. thanks.