revertEditedRecords() is deprecated too? Really?

Questions, tips and tricks and techniques for scripting in Servoy

revertEditedRecords() is deprecated too? Really?

Postby dfrazier » Tue Oct 09, 2012 5:59 pm

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!"
This is my signature.
User avatar
dfrazier
 
Posts: 40
Joined: Fri Jun 29, 2012 3:43 pm
Location: Earth

Re: revertEditedRecords() is deprecated too? Really?

Postby Joas » Wed Oct 10, 2012 10:50 am

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 3827 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).
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: revertEditedRecords() is deprecated too? Really?

Postby dfrazier » Wed Oct 10, 2012 2:44 pm

Thanks! That was very helpful. I will create a support case for the issue if it continues to happen.
This is my signature.
User avatar
dfrazier
 
Posts: 40
Joined: Fri Jun 29, 2012 3:43 pm
Location: Earth

Re: revertEditedRecords() is deprecated too? Really?

Postby dfrazier » Wed Oct 10, 2012 8:17 pm

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.
This is my signature.
User avatar
dfrazier
 
Posts: 40
Joined: Fri Jun 29, 2012 3:43 pm
Location: Earth

Re: revertEditedRecords() is deprecated too? Really?

Postby dfrazier » Mon Oct 22, 2012 3:24 pm

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
This is my signature.
User avatar
dfrazier
 
Posts: 40
Joined: Fri Jun 29, 2012 3:43 pm
Location: Earth


Return to Methods

Who is online

Users browsing this forum: No registered users and 5 guests