OPO 2.1 - does PreDeleteCheck() actually work?

From: Phil Herring <revdoc_at_uow.edu.au>
Date: 1997/11/15
Message-ID: <64iq2m$mnl$1_at_wyrm.its.uow.edu.au>#1/1


I have the following code in the PreDeleteCheck() method for a bound grid control. Based on the documentation for this method, I assumed that it will prevent deletion of the current row when it returns FALSE.

	if self.udmUpdateAllowed() then
		msgbox "Allowing delete"
		PreDeleteCheck = Inherited.PreDeleteCheck(rownum)
	else
		msgbox "Delete denied!"
		PreDeleteCheck = FALSE
	end if

(udmUpdateAllowed() calls a procedure on the server to verify that the record can be deleted.)

However, while I see the "Delete denied!" message where it should appear, the deletion is attempted from the recordset anyway (and it fails because the validation on the server fails, and because this happens in a modal dialog, the user has to force-quit the application).

Is there anything obviously wrong with the above method code?

Software versions: OPO 2.1 (build 36), Mac OS 8, RDBMS 7.3.2.3.



Copyright 1997 Phil Herring. This article may not be reproduced for profit.
Received on Sat Nov 15 1997 - 00:00:00 CET

Original text of this message