Solved

component: hook into destroy? (d3)

Posted on 1998-06-09
2
294 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:greendot2
2 Comments
 
LVL 3

Expert Comment

by:rickpet
ID: 1351775
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
0
 
LVL 2

Accepted Solution

by:
brainware earned 200 total points
ID: 1351776
I dont think it is possible under delphi3 , the only way to ensure that a object is not deleted it to make sure that the destructor never gets called!!!

And that seems very hard to do!!

Mvh.
CI - BrainWare

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question