Issue 120005 - Feature request: Allow VolatileResult to be different for subsequent function calls with same arguments. (XVolatileResult)
Summary: Feature request: Allow VolatileResult to be different for subsequent function...
Status: UNCONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-16 16:34 UTC by cfries
Modified: 2012-06-17 10:24 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description cfries 2012-06-16 16:34:57 UTC
As stated in the developer documentation, - see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Variable_Results -, subsequent calls with same arguments to functions with volatile results (XVolatileResult) have to return the same (XVolatileResult) object. Hence, the add-in function implementing the XVolatileResult has to maintain a map arg->resultObject.

However, this requirement is a limitation. Allowing volatile functions to return new objects for every new function call will be an improvement.

An example of an application is a random number generator like RAND(). The function RAND() returns a new random number for every subsequent call, even though arguments are the same (it has not arguments). Now consider a timer based (volatile) random number generator returning a new random number ever x seconds, e.g. RANDTICKER(double delay).

I experimented a lot with XVolatileResults. However, returning different objects for subsequent function calls with same arguments will lead to some (but not many) undesirable effects, like occasional claims of 522 error (circular reference).

PS: I do have a real (but more specific) use case in the application of Obba ( http://obba.info ) , where I need to return a volatile value which depends on the path of the calling spreadsheet.