Author Topic: Edited Macro doesn't run...  (Read 7455 times)

ojm37

  • Community Member
  • Posts: 21
  • Hero Points: 0
Edited Macro doesn't run...
« on: September 07, 2006, 06:51:38 PM »
When I edit a Macro (from the list macros menu) and then save it, SlickEdit does not run the new version of the macro until I re-load it explicitly with "Macro/Load Module". Why wouldn't SlickEdit reload the module automatically when I save it (after editing)? Not a huge issue, just a pain  :'( ....

Cheers,
Owen

jbezem

  • Community Member
  • Posts: 87
  • Hero Points: 8
Re: Edited Macro doesn't run...
« Reply #1 on: September 11, 2006, 01:54:34 PM »
Consider mapping the save button/key/command for *.e files to mean 'reload module'. IIRC, it will save the file first, and then reload.

As for why: Since SlickEdit also knows the concept of include-files, and a full project-management/make/dependency concept probably is overkill, one cannot be sure that only the currently saved file is to be reloaded, if at all.
And especially when I'm tinkering with commands I also depend upon in "daily life", I value the fine control I've been given over when a change will be reflected in the actual commands I can use. Yes, one could imagine another checkbox somewhere in the configuration dialogs...

FWIW,

Johan

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Edited Macro doesn't run...
« Reply #2 on: September 14, 2006, 01:39:39 PM »
I think this is not what most users want.
'Loading' a module compiles (!) it.
Think of the annoying errors/warning when saving a premature module...

But you may write a little save_and_load_my_macros() macro to be bound to a key or you make use of Slick's callback mechanism and supply a _cbsave_ojm37 macro, which checks for 'e' extension and add. loads the currently saved file.

Example:
Code: [Select]
void _cbsave_ojm37()
{
   if ( get_extension ( p_buf_name ) == 'e' )
   {
      int result= _message_box(nls("\nDo you want to perform add. actions now ?\n\n"), nls("Load '%s' ?." , p_buf_name),MB_YESNO|MB_ICONQUESTION);
      if (result == IDYES) load (p_buf_name);
   }
}

HS2
« Last Edit: September 14, 2006, 01:49:02 PM by hs2 »