Hi Thomas,
See inline.
>Hi Naomi,
>
>>Ok, I've tried to shutdown having Modal form opened and sure enough it didn't work.
>at least one hit in two tries <g>.
>
Yes, it was great I tested that path. We already fixed the error. Also I suggested to make a slight change in UnLockRecord method to add a second parameter for the table name, that my colleague is implemented already.
>>goApp.oRecordMGR.UnLockRecord(This.cTrans_pk)
>>But it's nice I saw this code, because I just relalized, I need to do something similar in one of my own form too.
>
>Really ? If the process is gone, all locks are goners as well. Or is this a step needed for a last saving ? Hint: wrap your exit routines in a try... catch, trying all your already found ways to close down. If then an error is thrown, catch it with a logging function for further cleaning efforts but stomp the app with processkill. That way your app will close down in your next release even if you haven't found all neccessary codepaths to act upon. Brute force has sometimes it's own elegance.
>
When the form is closed, we need to release that account. That's why the code was in form's PreDestroyHook. We do unlock all records for the user when the user starts the application. I don't remember, if we do it upon close as well, perhaps not.
If it's not broken, fix it until it is.
My Blog