Who is @SELF in the routines of Validation, Convercion, or Default? (OpenInsight Specific)
At 30 MAR 2001 07:57:13PM Luis B. wrote:
As I can know who is the "CtrlEntId" (as the "CtrlEntId", "CtrlClassId" of the functions of the Events), in my routines of Validation, Conversion or Default?. Something like that as the @SELF, @FOCUS, etc.
I can not use the "Get_Property(@Window, 'FOCUS')", in the validation for that the "FOCUS", already has it another control.
do I imagine that maybe it can use global variables as those of the "Insert OIWin_Comm_Init"?
I wait to have transmitted my doubt. And any help is grateful.
__
Luis B.
At 31 MAR 2001 11:45AM Donald Bakke wrote:
Luis,
CtrlEntId and CtrlClassId are variables that get set only in an event context so your custom validations will not be able to use them unless you explicitely set their values. We usually recommend that you don't put control specific logic in a custom validation because it restricts its usability to the form you are working on.
However, that doesn't mean we haven't violated our own principles . I believe we handle this problem by setting our own user-defined property in a promoted GOTFOCUS event with the name of the current control. A custom validation can get this information even thought the focus has already moved to the next control. That's because your custom validation will still be executed before the GOTFOCUS event of the next control so this user-defined property will still be equal to the control that is launching the custom validation.
dbakke@srpcs.com