Hi all,
have found a strange “behaviour” in a form. I had defined a while ago two constants in a form in Global /Declarations:
Const MaxEntries=12
Const MaxButtons=6
I now changed these values to 14 and 8 and saved the document.
Several action buttons with script code depend on these two constant values.
Now imagine our surprise when we detected that these action buttons still used the old values !!! We started the debugger and indeed inside(!) the action buttons the old values of these constants were still used and anywhere else (postopen/querysave) in the form we had the new correct values !!!
Solution: I added a little comment line in the script code of all action buttons and saved the document and voila, now it worked. This forced the compiler to recompile also the script code in the action buttons, which seemed to be somehow cached or so.
Test: We build a new form and tried to simulate this “misbehaviour” and . . . we couldn’t ! But I have to say that the original form was much more complex than our test form and of course a bit older.
Someone else with a similar problem ?
Joe
Subject: Lotus Script / Form / Global /Declarations were not updated in action buttons
Yep! I’ve had that happen on occasion. I usually try and blame odd behaviour on them making us use Novell laugh I have also had changes which were made to actions, like action bar colors/fonts/etc not save.
I ALWAYS make sure to do some kind of “change” even just adding a space after window title, to force the “Do you want to save this form” message box. I don’t recall that I’ve had the problem with changes not saving if I’ve had the box, only if I click on Save then close the form.
Also, just as a side note, when dealing with formula language, (see SPR GFLY57ZRY8), there seems to be a glitch with saving incorrect forumlas. My co-worker ran into this and we’ve had it added to the above SPR.
“When working with a formula in a view (possilby limited to PostOpen and QueryOpen) if the formula is not syntactically correct upon selecting the checkmark or save the formula is not updated. The formula reverts back to what it was prior to the change. We are basically experiencing the problem that we have found documented in Doc Number 1095067 (SPR GFLY57ZRY8), except that we are not working with R5. We have experienced it in both Designer 6.52 and 6.53.”
Subject: RE: Lotus Script / Form / Global /Declarations were not updated in action buttons
Deborah,
thanks for the side note !
We have meanwhile tested other forms and have found another form where we had defined constants under Global/Delcaration and we run into the same problem; the only action button who used one of these constants had still the old value.
I think the current caching strategie for Lotus Script is not efficient. One loses a lot more time to solve problems caused by side effects of this caching than one would lose if the compiler would compile the entire sourc code of an design object without caching parts of it.
Joe