Link to home
Start Free TrialLog in
Avatar of greendot2
greendot2

asked on

component: hook into destroy? (d3)

Is it possible to hook into the Destroy method of a component and actually prevent it from being removed from the Delphi 3 IDE?

I want to put in a verification routine, password dialog maybe, when a certain component is deleted.  If the verification routine fails, I don't want the component to be removed from the IDE.  I've tried raising exceptions but that causes a *lot* of problems with Delphi.

Thanks,
joe
Avatar of rickpet
rickpet

Look at The ToolsAPI to hook into the IDE, Ray Lischner has a book on this "Hidden Paths of Delphi 3".

In Delphi 4, TObject will have a new protected method called BeforeDestruction.  I'm not sure that this will help you...the ide and streaming system expect your component to be gone...

Rick Peterson
ASKER CERTIFIED SOLUTION
Avatar of brainware
brainware

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial