Author Topic: How to hook to file added to project?  (Read 3628 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: 4794
  • Hero Points: 388
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...