OnRecordEdited()

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

OnRecordEdited()

Postby tweetie » Thu Nov 30, 2006 9:12 pm

Luv to see something triggerred when a record (in whatever column) is edited.
onRecordEditStart is always triggerd when you click into a column, whether you change it or not
onRecordSave is always triggered when you click out of column, whether you change it not.
onDataChange works only on the selected column .

Basically I would like the same trigger used in Dataproviders when autoentering modification datetime

If there is some other trick to do this, then I missed it...
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby kazar » Fri Dec 01, 2006 10:56 am

I do find it to be "unexpected" that even with autosave set to false, simply clicking in a field and then clicking on the form background will trigger an onRecordSave event.... unless the test I just ran was somehow faulty, which would not surprise me given that it is now 4:00 a.m....... zzzzzz.....

kazar
User avatar
kazar
 
Posts: 367
Joined: Sat Sep 13, 2003 9:59 pm
Location: New York City

Postby Harry Catharell » Mon Dec 04, 2006 7:52 pm

Hi Ilyse,

I suppose that I look at it that 'autosave' is a snapshot state which can be changed at will.

Therefore, I should test for that state before doing subsequent processing.

Thus I would consider wrapping the onRecordSave method inside a test for that state as follows:
Code: Select all
var autosave_state = databaseManager.getAutoSave()

if ( autosave_state == true )
{
Do the things you want onRecordSave as autosave is on;
}
else
{
Don't do those things until saveData() is called ;
}


Cheers
Harry

...... missed you in Boston, BTW :(
Harry Catharell
 
Posts: 812
Joined: Fri Sep 26, 2003 10:23 am
Location: Milton Keynes, England

Postby kazar » Tue Dec 05, 2006 2:17 am

works like a charm, thanks Harry.

kazar
User avatar
kazar
 
Posts: 367
Joined: Sat Sep 13, 2003 9:59 pm
Location: New York City


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests

cron