Sending a "Write" to a form and unlocking (OpenInsight Specific)
At 15 FEB 2000 11:32:14AM B. Cameron wrote:
I have bound form(b) that has a item ID control and 1 table (1 column) and is called via the Dialog_Box function from
a button or a dblclick on another form(a).
Once form (b) is up, I want to allow the user to be able to add or delete entries from the table and then "SAVE" , "CANCEL", or "EXIT" or
double click on a row value to be passed back to the calling form (a) and fill a control.
All works well except I wanted the user to be able to change the table and then doubleclick a value whereby the dblclick event updates the item and "unlocks" and then passed the value back.
Here is what I have done in the dblclick event of the tableā¦
Declare Subroutine End_Dialog
Retval=Send_Event(@WINDOW, "WRITE")
End_Dialog(@WINDOW,Val)
RETURN 0
If I go into this form again "the entry is locked". Why is it not getting unlock?
The layout is MDIFRAME - ] Form (a) mdichild - ] Form (b).
At 15 FEB 2000 12:08PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Is the dialog box using the standard system write/save logic or have you added event handlers to it.
What happens if you change this to a start_window or modal window call.?
Something in the dialog box routine might be prohibiting the unlock logic, though if you know the key to the record you could always issue the unlock call yourself.
World leaders in all things RevSoft
At 15 FEB 2000 12:22PM B.Cameron wrote:
Sprezz,
]]Is the dialog box using the standard system write/save logic or have you added event handlers to it.
# Nope not doing anything here!
]]What happens if you change this to a start_window or modal window call.?
# I'll give it a try.
]]Something in the dialog box routine might be prohibiting the unlock logic, though if you know the key to the record you could always issue the unlock call yourself.
# I tried that but it did make a difference. I put a
Unlock file.var,id else
End
Thanks for the response
At 15 FEB 2000 03:28PM Don Bakke wrote:
Bruce,
This happens when the window gets closed and the record is still in the window. I suspect that you do not have the form being cleared upon writing the record, which then leaves the record in place. Turn this off and see if the problem still exists.
At 16 FEB 2000 01:01PM B. Cameron wrote:
Don,
I have fixed it by upgrading my OI release and adding the
unlock statement before the End_Dialog.
I am curious though by what you mean when you say "turn off"
during the close.
Bruce
At 16 FEB 2000 01:18PM Don Bakke wrote:
Bruce,
In the Form Designer go to the Database-]Options menu. A dialog box titled "Form Database Options" will appear. At the bottom will be a checkbox called "Clear Form after Write". If this is checked off you should check it. When I said "turn off" I really meant to check this box.