Hi Emil,
I can only get part way there..and am looking for help also.
I have not been able to use the event slots exposed on the property
editor either. Instead I believe one must use listeners created in code.
To this end I have the following basic routines in a librarys:
REM --------------------------------
Global oApproveChangeHandler As Object
sub onAddListener( oEv as object )
RegisterRowChangeHandler( oEv.source.Model.Parent )
end sub
sub onRemoveListener( oEv as object )
oEv.source.Model.Parent.removeRowSetApproveListener( oApproveChangeHandler )
end sub
Sub RegisterRowChangeHandler( oForm as object )
oApproveChangeHandler = _
createUnoListener("AppChHndlr_", "com.sun.star.sdb.XRowSetApproveListener")
oForm.addRowSetApproveListener(oApproveChangeHandler)
End Sub
function AppChHndlr_approveCursorMove( oEvent ) as boolean
print "hello approveCursorMove"
AppChHndlr_approveCursorMove = TRUE
end function
function AppChHndlr_approveRowChange( oEvent ) as boolean
print "hello approveRowChange"
AppChHndlr_approveRowChange = True
end function
function AppChHndlr_approveRowSetChange( oEvent ) as boolean
print "hello approveRowSetChange"
AppChHndlr_approveRowSetChange = TRUE
end function
Sub AppChHndlr_disposing(oEvt)
End Sub
REM --------------------------------
On a form I have a table grid and two buttons. One button's click event
is assigned to onAddListener, the other assigned to onRemoveListener.
Now you can add records, move around, etc. and see what is being called
when.
If I delete a record the system pops up a nice message box asking if I
want to continue. The problem is I can't figure out how to get the
result of the users response to this message box?
I am using 2.0.3 under WinXP.
Thanks
Drew
Emil Karlen wrote:
I have a form connected to a database table and want to let the user the
ability to abort the deletion started by clicking the "delete record"
button in the "Form Navigation" toolbar (using a Yes/No dialog box).
I have tried to return the value FALSE from the event handler for the form's
"Confirm deletion" event, but it does not seem to work.
Does anyone know how to do this?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]