Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to get remaining time for baton after setting timeOut property

Avatar

Level 3

Hello,

Is it possible to get the remaining time for baton after setting timeOut, or do I have to maintain a separate Timer for that?

Been following this excellent tutorial here http://tv.adobe.com/watch/adc-presents/create-shared-forms-in-livecycle-collaboration-service/

1 Accepted Solution

Avatar

Correct answer by
Level 10

That's no big deal - just extend BatonProperty and replace instantiation of

the Baton with your extended Baton, then add a getter which returns that new

getter you added to Baton..

nigel

View solution in original post

5 Replies

Avatar

Level 3

I think I will have to try and get _autoPutDownTimer , perhaps through some inheritance. Have to brush up on my OOP skillset

Avatar

Level 10

Yeah, I'd definitely extend the existing class, and add a timestamp variable (flash.utils.getTimer() can work) every time the _autoPutDownTimer is started or extended. Then you can add a public getter :

public function get timeOutTimeLeft():int

{

   return (_autoPutDownTimer.delay - getTimer()-timestamp);

}

hope that helps

  nigel

Avatar

Level 3

Thanks Nigel, before reading your reply, I came up with something like this, but it seems extending the Baton class is not enough, as I would need my own BatonProperty as well that uses this extended Baton class...

Also attempted to get some help here http://stackoverflow.com/questions/7116814/actionscript3-lccs-how-to-access-property-parent-class-pr...

Could this be made into a feature request for Baton and BatonProperty, se we could easily get the remaining time please?   I guess I can wait for a future release.

/custom as file /

Avatar

Correct answer by
Level 10

That's no big deal - just extend BatonProperty and replace instantiation of

the Baton with your extended Baton, then add a getter which returns that new

getter you added to Baton..

nigel