Page 1 of 1

revertEditedRecords() is deprecated too? Really?

PostPosted: Tue Oct 09, 2012 5:59 pm
by dfrazier
I upgraded to Servoy 6.1.2 after having used 6.0.something. I noticed that databaseManager.rollbackEditedRecords() is now deprecated. So I was searching around on here:
http://wiki.servoy.com/display/public/D ... se+Manager

I saw the databaseManager.revertEditedRecords() function and figured it was the replacement. However, when I use revertEditedRecords(), the servoy developer tells me it is also deprecated. So my question is: is revertEditedRecords() actually deprecated or is that a mistake? If it IS deprecated, what do I use instead.

And on another note, when functions become deprecated, what is the best way to determine which function is now replacing it? Just look on the Servoy wiki? Documentation in the developer? Maybe there is a list of deprecations somewhere and their replacements? I did not see anything jumping out at me saying, "Hey! Use this instead!"

Re: revertEditedRecords() is deprecated too? Really?

PostPosted: Wed Oct 10, 2012 10:50 am
by Joas
When you hover a deprecated function in your code when pressing the Alt-key, you get a tooltip explainin what to use instead:

rollbackeditedrecords.png
rollbackeditedrecords.png (19.86 KiB) Viewed 3859 times


rollbackEditedRecords() is indeed replaced by revertEditedRecords().
I'm not sure how it is possible that it tells you it is deprecated too, because that is not the case. If you still have that, please create a case in our support system (with a screenshot and your solution attached if possible).

Re: revertEditedRecords() is deprecated too? Really?

PostPosted: Wed Oct 10, 2012 2:44 pm
by dfrazier
Thanks! That was very helpful. I will create a support case for the issue if it continues to happen.

Re: revertEditedRecords() is deprecated too? Really?

PostPosted: Wed Oct 10, 2012 8:17 pm
by dfrazier
I wrote up the bug. It only happens with revertEditedRecords(record). The version of the function that takes a foundset and the version of the function that takes no parameter are both unaffected.

Re: revertEditedRecords() is deprecated too? Really?

PostPosted: Mon Oct 22, 2012 3:24 pm
by dfrazier
And one final note on this issue. Hovering over deprecated function text using the alt modifier key did not actually work for me by default. It was never set to work in my Servoy 6.1.2 install. I do not know why. To set this manually you need to go to Window->Preferences->JavaScript->Editor->Hovers, then check "Documentation", and set it to use the ALT key modifier. This procedure is detailed with screenshots here: viewtopic.php?f=38&t=18274