Isn't that code essentially the same as what I am doing? It does get the object under the mouse pointer.
What am I missing?
>Here is this method
Re: Making Date Entry Required ?? Thread #
1123023 Message #
1123172>
>>Naomi
>>In the Valid or LostFocus the first statement is to verify that a close or cancel button has not been clicked.
>>
>>LOCAL oLoc,lsValue,llAct,llOK,lsMsg
>>STORE "" TO lsValue,lsMsg
>>STORE .T. TO llAct,llOK
>>* get the location of the Cancel & Close button (cmdDelete & cmdClose)
>>* get reference to object under mouse pointer
>>oLoc = sys(1270)
>>if vartype(oLoc)="L"
>> oLoc = This
>>endif
>>IF !INLIST(lower(oLoc.name),"cmdUpdate","cmddelete","cmdedit","cmdadd","cmdclose")
>>
>>
>>I believe it "finally" dawned on me that there was an issue with that code. if the mouse pointer is left on the add or edit button after either are clicked, the Valid or LostFocus code does not run, "by design"...crap! I have had issues like this (valid code not running), intermittently for a while. Who knows why the light-bulb just turned on! It helps to have the coverage profiler turned on.
>>
>>When I removed the above reference to "cmdedit, cmdadd" the code works.
>>
Extreme Programming = Plan -> Design -> Code -> Test