Release Notes / Version 11.2201
Table Of ContentsWe needed to change the behaviour of #setLinks(), #addLinks(), #addLinksAtIndex(), #moveLinks(), #moveLinksToIndex() and #removeLinksAtIndex() for some important implementations of ILinkListWrapper to be asynchronous. As a consequence, we changed the signature of these methods to return a Promise. In custom implementations where no asynchronicity is needed, the code can simply be changed as in the following example.
Before:
override public function setLinks(links:Array):void { getVE().setValue(links); }
After:
override public function setLinks(links:Array):Promise { return new Promise(function (resolve:Function):void { getVE().setValue(links); resolve(links); }); }
Code that uses the methods does not necessarily need to be changed. Just note that the result is not immediately present after method invocation. Also, if you want to catch errors that happen during the method execution, you can no longer use a try/catch block but you have to use Promise#_catch() instead.
(CMS-19108)