Author Topic: SlickEdit Maintained Exit Points  (Read 11363 times)

Thom Little

  • Community Member
  • Posts: 83
  • Hero Points: 2
SlickEdit Maintained Exit Points
« on: July 11, 2006, 02:57:11 PM »
editorsdit does not have a "system event handler" mechanism that is found in some other edtors.  This is a predefined exit point where a separate function is invoked by SlickEdit.

I currently have one that is implemented by inserting a direct call to my function in SlickEdit it gains control whenever a Save occurs and I do some custom processing.  In 11.0.1 it is inserted at  ...

files.e
line 1075
tlaEventSave( cmdline, flags );                     // Call Third Party Save Event Exit

The problem is that every time new release of SlickEdit comes out I have to find the new location to insert the call to my function.

It would be great id there was a NOP (a comment would do) maintained at that location by SlickEdit that said

files.e
line 1075
// SlickEdit System Exit - Save

When a new vestions was installed I would simply do a replace, reload (er. recompile) files.e, and my "exit" would be activated.

Are you capturing control at other SlickEdit locations to do special things?

Would a "SlickEdit maintained" comment at that location be helpful to you?

... Thom

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: SlickEdit Maintained Exit Points
« Reply #1 on: July 11, 2006, 03:57:40 PM »
There are a number of events you can hook in SlickEdit, they are just very hard to find.
The SlickEdit help documents one:

Invoking a macro on exit
If you want a function to be invoked when the editor exits, create a macro procedure with a name that has the prefix _exit_. To automatically invoke a macro when exiting SlickEdit, use the following code.

_exit_cleanup_stuff()
{
    messageNwait("Got here");
}

 
I know of several others:
_cbsave_
_prjopen_
_prjclose_
_switchbuf_

Does anyone have a complete list?

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: SlickEdit Maintained Exit Points
« Reply #2 on: July 12, 2006, 01:02:48 PM »
There are a number of events you can hook in SlickEdit, they are just very hard to find.
The SlickEdit help documents one:

Invoking a macro on exit
If you want a function to be invoked when the editor exits, create a macro procedure with a name that has the prefix _exit_. To automatically invoke a macro when exiting SlickEdit, use the following code.

_exit_cleanup_stuff()
{
    messageNwait("Got here");
}

 
I know of several others:
_cbsave_
_prjopen_
_prjclose_
_switchbuf_

Does anyone have a complete list?


Searching for call_list in slick macro directory you can see the following - and maybe more.  The _exit_ one appears with hyphens instead of underscores for some reason  -  I've always been a little mystified about the interchangeability of hyphens and underscores in vse.

Graeme


_MenuAddFileHist_
_MenuAddWorkspaceHist_
_actapp_
_adaformatSaveScheme_
_b4wrst_
_buffer_add_
_buffer_renamed_
_buffer_renamed_
_cbmdibuffer_hidden_
_cbquit2_
_cbquit_
_cbsave_
_cbstop_process_
_cd_
_diffOnExit_
_diffOnStart_
_dockchan_resize_
_document_renamed_
_ftpQBusy_
_ftpQIdle_
_gotfocus_
_hformatSaveScheme_
_lostfocus_
_on_load_module_
_on_popup2_
_on_popup_
_on_unload_module_
_postbuild_
_prebuild_
_prjclose_
_prjconfig_
_prjedit_
_prjopen_
_prjupdate_
_prjupdatedirs_
_project_close_
_project_file_add
_project_opened_
_sr_
_srg_
_vi_switchmode_
_wkspace_close_