Expand my Community achievements bar.

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
Former Community Member

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

Former Community Member

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
Former Community Member

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

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----