CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delete in TTable
Why not just use the BeforeDelete method in TTable. This is called when
you try to delete but before the record is deleted. You can simply add
your CanDelete var to the private section of the TForm header and then
check it from your BeforeDelete code.
Mike
>
>Hi,
>
>I want to elaborate on my own question:
>
>I tried to solve the problem by creating a new component which will
inherit
>from TTable. In this new component I intended to override the Delete
method
>and make it conditional, depending on a private var 'CanDelete'. If
>CanDelete is True it will call the inherited Delete, if not, it will
just exit.
>
>CanDelete my be set to True or False by the BeforeDelete event handler,
>depending on some condition.
>
>BUT !!! It wouldn't let me do it! I get the message 'cannot override
static
>method'
>
>
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
W Komornicki's Home Page |
Main Index |
Thread Index