Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid Event does not fire when I click outside of the ob
Message
From
24/09/1998 17:06:59
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00119392
Message ID:
00140587
Views:
40
>>>so at the grid.column.text.setfocus, when i use "this" it has the value "osdi.omainscr.page6.disb1.disb1grid.column1.text1".
>
>>>Actually, it doesn't. THIS, just passes an object type variable, not a string containing the object name and containership hierarchy.
>
>>>Whatevever function receives the variable can use the reference to call any exposed method of that object.
>
>Erik,
>
>who knows what stupid mistake i have doing for two days. but your reply prompted me to try it one more time, and keep it simple. of course it worked. still do not understand where i went wrong. but i am not wasting any time finding out, for now. thanks.
>
>another sortof related question. my main focus has been to make sure that validations take place before you save. well now i am having an opposite problem. when the client presses the cancel button an error messagebox pops up. the situation is that the focus is set on a control that has an error condiiton. the client presses the cancel button on the toolbar. the cmdcancel calls a custom method that zaps the grids recordsource (grid is only input, so it is where focus was and what has the error), and then inserts correct records into the grid's recordsource. then i set focus to column1 of the grid. now the messagebox pops up. i believe this is the sequence. can not follow it in the debugger because the debugger takes focus and the messagebox pops up right away. am putting a ton of wait windows in now. any thoughts on this?
>
>thanks - brenda

Make sure that your cancel button has its cancel property set to .T.
This does a couple of things:
clicks the button if the user hits escape, and fills the puts the escape key in LASTKEY() when the cancel button is clicked. Now you have a way of checking if the user is trying to cancel out of the edit.

In your valid events, bypass all checking code if LASTKEY = 27.
IF LASTKEY() = 27
    RETURN .T.
ENDIF
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform