Author Topic: How to hook to file added to project?  (Read 5136 times)

orhun

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
How to hook to file added to project?
« on: April 23, 2007, 06:27:07 PM »
Is there a way to set a callback to be called when a file (new or an existing one) added to a project? "_project_file_add" doesn't seem to be called. "AutoMake"  seems like doing it but I couldn't find how.

Thanks.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: How to hook to file added to project?
« Reply #1 on: April 24, 2007, 03:20:52 PM »
There isn't a hook which does individual project file inserts or deletes.  For 12.0.1 (first patch), you could write a "_prjupdate_<your name>" function and it will get called when files are added or removed from the project by any means.  You just won't know what files were added or removed.  You'll need to fetch the list of files in the workspace or project to see if any changes actually happened.  This won't work in 12.0.  We enhanced this call back for 12.0.1 because we needed it for the new Files tool window.

Hope this helps you

orhun

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: How to hook to file added to project?
« Reply #2 on: April 24, 2007, 06:24:48 PM »
I don't need to know which file has been added anyway. But I am currently using 11.0.2.
Perhaps it is time to upgrade :)  I don't see 12.0.1 update in SlickEdit Updates list, will it be released soon?

Thanks...