On Jul 17, 2006, at 10:22 AM, Terry Ford wrote:


On Jul 17, 2006, at 8:10 AM, Norman Palardy wrote:


On Jul 17, 2006, at 7:48 AM, Chuck Pelto wrote:

Greetings,

Just for clarification purposes....

Is it a 'feature' of the EditField's TextChange event to trigger when the text changes as a result of going to a different record in a database and populating the field with the new data?

Or, should the TextChange event be triggered only when someone actively changes the text in the EditField, by typing or pasting text into the EditField?

TextChange is called whenever the text changes.
Regardless of how the change is triggered.

A simple workaround is to use your own property (like "TextHasChanged As Boolean" in the tutorial). This way you have total control over opening new records or files and setting the "SetWindowModified" widget on Mac. You can make this a window property or a class property if you use a custom subclass of Editfield.

The solution would be to set up another property that would be used another property inside of an editable control object. Something like RecordChange. TextChange being triggered when someone changes the text in an EditField using typing or pasting. RecordChange being an event that is triggered when a record from a database is changed.

Admittedly, RB would probably be more interested in your in-house database system than Valentina. So it's unlikely RB would be made to detect such a change in Valentina or any other database that wasn't part and parcel of RB.

In the meantime, I've set up a boolean property to hold off updating data in editable fields when there is a RecordChange going on. It's 'kludge', but not particularly egregiously so.

The only difficult part about it is making sure it is being properly set whenever and wherever a record change is being triggered. Otherwise, the database can get 'hosed'. This is especially true when going from a VTable to a VCursor.

Regards,

Chuck

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to