Consultor Eletrônico



Kbase 18730: RTB - Unlocking an Object From a Custom Edit Program.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/9/1999
SUMMARY:

To unlock an object from a custom edit program associated with a
subtype, or to unlock from a hook fired from an editor other than the
Progress Procedure Editor, you need to send "close" to _adeevnt.p.
This will remove both the in-use record and the lock on the object.
This also causes the "Roundtable Version Note for OBJECT" to come up.

EXPLANATION:

You will find the following entry in rtb_open.p (custom edit
program provided with Roundtable):

RUN adecomm/_adeevnt.p
( INPUT "rtb_open", /* product id
*/
INPUT "open", /* event
*/
INPUT STRING(THIS-PROCEDURE:HANDLE), /* context
*/
INPUT Mfile, /* p_other =
filename */
OUTPUT Mok ). /* ignored
*/

This is the same call needed to close an object except change the
'input "open"' to be 'input "close"':

RUN adecomm/_adeevnt.p
( INPUT "rtb_open", /* product id
*/
INPUT "close", /* event
*/
INPUT STRING(THIS-PROCEDURE:HANDLE), /* context
*/
INPUT Mfile, /* p_other =
filename */
OUTPUT Mok ). /* ignored
*/

You want this lock to remain on an object until the users are done
editing it. This means that if you are editing a bitmap in
paintbrush, you would not want to unlock an object until the user
closes Paintbrush. This means that you would not want to send "close"
to _adeevnt.p from within a custom edit program such as rtb_open.p (it
would unlock it before you are done editing).