Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return .f. still allows exit from field. Why?
Message
From
27/08/1999 14:12:50
 
 
To
27/08/1999 12:16:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00258304
Message ID:
00258549
Views:
12
Greetings Mike
>
>Can you post your code from the valid in the subclassed textbox?

I did! its the code in the first post. However, lets not be miserly with our bandwidth. Here it is again!

if not IgnorePaymentTomorrow
if this.value=date()+1
action=messagebox("You have entered Tomorrow's date - "+dtoc(thisform.paydate)+chr(13);
+'Is this what you really meant?',259,'Payment Tomorrow!')
if action<>6
return .f.
endif

action=messagebox("Are you likely to enter further Payments (during this session) with Tomorrow's date?",259,'More Tomorrows?')

if action=6
ignorePaymentTomorrow=.t. && don't irritate the user if they've already told us they're entering more like this
endif
endif
endif

there is more of it checking for other odd date entries, but they all behave the same way.

>when you return .f., what level of the hierarchy is that from?

Not sure I understand the question. I think the answer is that the validation code is in the subclass, not in the instance on the form. That, after all was the point of subclassing it originally. I have three separate forms which each require the same date field with the same validations, so I figured it would save repetition if I did it once, got it working, then subclassed it and used the class in all three forms.

I'm sure its something to do with hierarchy but haven't a clue what implications that has or what to do about it. All I do know, as I said to Craig, is that the original version (prior to subclassing) works exactly as intended.

> Do you have something like:
>
>return llCondition and dodefualt()

nope, just what you see above. In the form instance its just 'default'

Does this clarify?

Harry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform