Hi,

I encountered that under some conditions dTextBox control
doesn't propagate its Value to DataSource.
Most of controls like dRadioList, dCheckBox flushes their
values to DataSource directly, but dTextBox uses delaying
flushes via _afterValueChanged/LostFocus mechanism.
I agree that's useful feature but there is one problem with such
approach.
Any change of Value property when object has focus on it, isn't
propagated to DataSource. Why?
Because you set _oldVal attribute twice, first in
_setValue() method and second in flushValue() method.
First setting is redundant and causes that flushValue()
called later doesn't recognize object as modified and
doesn't fire validation and doesn't update DataSource neither.
I suggest that instead of code:
     _oldVal = self._oldVal = self.Value
you use:
     _oldVal = self.Value
This will not break update chain.
Real example of such problem is text box control with
autofill feature I wrote. Since on every hit, Value property
is verified against database and hinting accordingly,
problem described above raises.

-- 
Regards
Jacek Kałucki


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to