Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hourglasses when clicking on the Header
Message
From
03/02/2005 14:14:05
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00981532
Message ID:
00983581
Views:
50
>>>Fabio,
>>>
>>>Today I do not see hourglasses, however, I see, that not every click is handled. And I think, I know why. I have a bug here
>>>
>>>LOCAL lcOrder
>>>	lcOrder = SET('order') && Save current tag
>>>	THIS.SetOrder(m.loCalledBy.PARENT.CONTROLSOURCE)
>>>	IF this.lShowSortingArrows AND NOT SET('order')== m.lcOrder
>>>
>>>I need to also remember last sort order (asc/desc)
>>>
>>>UPDATE. I had a bug in the logic, which I fixed. However, still not every click is handled. It's like 5 clicks are handled then one is missed, then again they are handled. Something internal to VFP is going wrong here.
>>
>>Effectively the Header class and the mouse are not friends.
>>
>>Fabio
>
>It must be something related with the setting the pictures. I do not see Hourglasses if I do not set pictures, e.g.
>
>IF THIS.lShowSortingArrows
>* Check, if we changed the order
>		IF NOT ORDER(m.lcRecSource)== m.lcOrder OR m.llDirection <> THIS.lAscending
>** Clear the picture of the previously sorted column
>			THIS.ClearHeaderPictures()
>			THIS.SetHeaderPicture(m.loCalledBy)
>		ENDIF
>	ENDIF
>
>Setting lShowSortingArrows to .f. gets rid of HourGlass problem. I changed my ClearHeaderPictures method to use object reference rather than loop through all columns, but it seems to me that it made the situation even worse. May be the problem lies in passing object reference between methods?
>
>UPDATE. In HeaderClick method I changed first line
>LOCAL loCalledBy as Object
>to
>local loCalledBy
>
>and it seems to fix the problem. I am unable to see hour glasses again.


Nadya,

This is strange, and show another VFP side behaviour;
AS Object it would have to be ignored from VFP.

I do not use AS when a variable is declared,
now I have an other good reason to continue therefore.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform