|
pfc_undoinsert
|
|
Full name
|
pfc_n_cst_tvsrv_levelsource.pfc_undoinsert
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
event integer pfc_undoinsert()
|
Name
|
Datatype
|
ll_undohandle
|
long
|
event pfc_undoinsert;call super::pfc_undoinsert;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_UndoInsert
//
// Arguments: None
//
// Returns: integer
// 1 = success; last Insert was undone
// 0 = nothing to undo
// -1 = error
//
// Description: Process to Remove the last inserted item from the treeview
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
long ll_undohandle
// check reference variables
If IsNull(itv_requestor) or Not IsValid(itv_requestor) Then Return -1
// do not undo if undo is not set
If Not ib_undo Then Return -1
// check to see if we have something to undo
If il_UndoInsertHandle < 1 Then Return 0
ll_undohandle = il_UndoInsertHandle
// Reset the undo insert variables (here if there are problems so we don't try to uninsert the wrong thing)
il_UndoInsertHandle = 0
is_UndoType = ""
// pfc undo process running - do not display confirmation messages
ib_isundoing = True
If of_deleteitem(ll_undohandle) < 1 Then Return -1
// pfc undo process not running - ok to display confirmation messages
ib_isundoing = False
// reset again so deleteditem is not current undo
is_UndoType = ""
return 1
end event