Jump to content
Updated RadStudio RoadMap Read more... ×
santiago

Tools Api: want to be notified when a DFM file is saved

Recommended Posts

Hi there,

 

I want to develop a plug-in for the Delphi IDE. In that plug-in I want to be notified after a DFM file has been saved.

 

I have been looking at the Open Tools API and am a little unsure about how to proceed.

 

What I have found is that it is possible to attach a IOTAModuleNotifier to a Module (IOTAModule40.AddNotifier). The notifier 'AfterSave' method should be called after the module is saved.

But this means that I have to keep track of all open modules and make sure to attach/detach notifiers.

 

Ideally I would be able to register one global Notifier, that would be called everytime a file is saved.

I could then check if the file is a form (*.dfm) and take appropriate action. I have not found a way to do this.

Anyone know if this possible?

 

Thank you!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Share this post


Link to post
1 hour ago, santiago said:

But this means that I have to keep track of all open modules and make sure to attach/detach notifiers.

Yes, that is the way it has to be done.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×