Hi Ed,
Put lines in exactly as you detailed. Assume the correct file was :-
C:\dabo\dabo-0.8.4\dabo\dabo\ui\dDataControlMixinBase.py on my system.
Ran my application from within the ClassDesigner. On first record
displayed cleared the first field then tabbed to the second - no error
message and no output on the console window. Navigated to next record and
then back. Original value was back in the first field. Cleared it again and
tabbed to the second field. Error message was displayed in the status bar
"Validation failed for MTypeDesc: Please enter a description". Again no
output appeared on the console screen. ie no change in behaviour and no
output from the debug lines. Have I put the debug lines in the wrong file?
I'll now try putting the validation in the AppWizard version and see what
happens.
Rodgy
----- Original Message -----
From: "Ed Leafe" <[EMAIL PROTECTED]>
To: "Dabo Users list" <[email protected]>
Sent: Friday, November 21, 2008 2:59 PM
Subject: Re: [dabo-users] Bizobj Validation
> On Nov 20, 2008, at 9:31 PM, Roger Lovelock wrote:
>
>> I am validating that the field must have a value. The initial record
>> displayed already has a value. If I clear it and save (record level
>> validation) or clear it and tab to the next field I do not get the
>> validation message. If, however, I have navigated prior to this to
>> another
>> record all works fine and the error message appears (in both cases).
>
> Can you make this change to dabo.ui.dDataControlMixinBase.py?
>
> 68 def _lostFocus(self):
> 69 ok = True
> print "IN FLD VALID", self._inFldValid
> print "OLD", self._oldVal
> print "CURR", self.Value
> 70 if self._inFldValid or (self._oldVal != self.Value):
> 71 # Call the field-level validation if indicated.
> 72 if hasattr(self.Form, "validateField"):
> 73 ok = self.Form.validateField(self)
>
> After you add those debugging lines, run your app as your have and
> post the output in your reply.
>
>
> -- Ed Leafe
>
>
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]