Solved

component: hook into destroy? (d3)

Posted on 1998-06-09
2
270 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now