Sending the CALCULATE event (OpenInsight)
At 03 APR 2000 05:22:33PM Paxton Scott wrote:
I don't know why this is not working. I have a form opened on top of another form. a change is made to so data and the top form is closed (and the record saved). In the lower-original form, there is a symbolic field (EDITLINE control) that I want to recalculate.
On the write event of the 2nd form, I do a
status=SEND_EVENT(form1.control, "CALCULATE")
I've checked form1.contol, and the correct CtrlEntId is being referenced.
But, the control is not updating. Of course if I reread the record, it recalculates and shows the new data, but i want the revised data to show when the 2nd form closes….what am I missing???
At 03 APR 2000 09:10PM Paxton Scott wrote:
Well at least I'm starting to understand calculate…old AREV knowledge dies hard! I want the dictionary symbolic to recalculate!
So I can do that and stuff the control….
I see notes about updating DEFPROP and/or INVALUE but I really don't understand. It reads to me like update TEXT in the case of this control. But update with what? Of course after I manually recalculate I'll set TEXT…what's going on here?
-Paxton
At 03 APR 2000 10:56PM Donald Bakke wrote:
Paxton,
In AREV you had a value that was stored in WC_IS% and you had a value that was stored in @RECORD. It is possible that the two don't match, especially during the Post-Prompt process of a field. There is sort of the same relationship in OpenInsight controls.
The TEXT property of a control, strictly speaking, only tells you what is visibly displayed in the control itself. It does not necessarily tell you what is technically in @RECORD…although 99% of the time they match. When you manually enter text in an editline, for instance, and then tab out of the control then OI will update @RECORD with the information you entered. However, if you programmatically set the TEXT property of that same editline then @RECORD won't be updated until you write the row. If you want @RECORD to be updated immediately then use DEFPROP instead of TEXT. It works exactly the same way (in terms of your coding) but @RECORD will be updated, the SAVEWARN flag will be set, and Sent_Event(Ctrl, "CALCULATE") commands will work as well.