Re: Some questions about forcing recalculation
Posted by Andrew Kolesnikov on
URL: http://quantlib.414.s1.nabble.com/Some-questions-about-forcing-recalculation-tp12208p12210.html
"I wouldn't say that triggers are inconvenient - I would say that your Excel
application should be carefully designed to ensure that object dependencies
are maintained through the use of triggers."
In fact object dependencies are absolutly maintained through the use of triggers, but this usage is inconvenient. For example, you've created an object ("my_obj") and calculate some functions (maybe dozens) with this object as a parameter. So the user of created application should directly reference to the cell with returning string ID (for instance "my_obj#001") through trigger argument. In case of you example:
"Construct objects as a separate step, when the application is initialized or in response to menu events. Workbooks containing constructors should be opened once, calculated and closed to prevent unnecessary object reconstruction."
it becomes impossible at all, cause object workbook have been closed. Is this another way to reference all necessary objects as trigger argument when the application is initialized or maybe some other algorithm to prevent user from referencing trigger cell every time he calculates new function? Maybe, i missed smth, but i don't know what to do :(
"The XLL can use xlcOnRecalc to trap the recalculation event but I would strongly advise against that in this situation."
Absolutely agree with you.
Regards,
Andrew