Recent Posts

Pages: [1] 2 3 ... 10
1
SlickEdit® / Re: is the plugin mechanism useable in 25.0.2
« Last post by Graeme on Today at 06:20:08 am »
Thanks.  I often get a slick stack if I leave a timer running.  I think I will remove the _on_load_module thing I have, since definit can do it.
2
SlickEdit® / Re: WRT set-bookmark
« Last post by Dan on June 17, 2021, 03:25:00 pm »
There's also alt-bookmark and alt-gtbookmark to set and jump to bookmarks.  You can bind them to ctrl+number keys and alt+number keys (I know they both have alt in the title, but generally you use one of them to set the bookmark, and one to jump to it).

Just in case you guys didn't know.

Edit: Dennis beat me to the punch on this, but I'm leaving my response because it explains a little bit about how it works.
3
SlickEdit® / Re: WRT set-bookmark
« Last post by Dennis on June 17, 2021, 03:24:16 pm »
Take a look at alt_bookmark(), and it's lil buddy alt_gtbookmark (goto bookmark).
4
SlickEdit® / Re: is the plugin mechanism useable in 25.0.2
« Last post by Clark on June 17, 2021, 02:02:29 pm »
I'm not sure I understand what you are trying to do. Usually, definit() is used to initial global and/or static variables as if you loaded your module for the first time. Unlike C++, Slick-C can store the value of global and/or static variables in vslick.sta and often these variables need a specific initial state. _on_load_module only gets called when your module is loaded. definit() gets called either when the module is loaded or when the editor is invoked. The extra argument passed to definit(), let you know which case you are handling.

The first time the module is loaded or on invocation, your timer won't be running until you start it. If a module is reloaded (already loaded and you are loading it again), then you may or may not want to reset your timer. Most of the time you can get away with leaving your timer running.
5
SlickEdit® / Re: Making the Build window just another tab
« Last post by LBCEi on June 17, 2021, 01:45:03 pm »
Thanks for the suggestions.

Renaming vrestore.slk or vslick.sta didn't help.  Neither did making minor changes to the menu.

However, what did work was the following:
  • Delete the Send Output to Editor Window item from the menu
  • Close the .process buffer editor tab
  • Issue the toggle-process-tab-output command at the command line -- Process already running message resulted in the status bar
  • Issue the toggle-process-tab-output command at the command line again -- no message in status bar
  • Put the Send Output to Editor Window menu item back in.

Note that I don't know if steps 1 and 5 were actually needed.  Also, I haven't tried to turn this on and off with the menu again, but at least I can build again without getting the .process editor tab. 

Perhaps the 'Process already running' message in step 3 is a clue to why it didn't work in the menu?  I don't remember seeing any message, though, when I tried to turn it off with the menu.
6
SlickEdit® / Re: Making the Build window just another tab
« Last post by Graeme on June 17, 2021, 06:00:25 am »
You could try this - close slick and rename vrestore.slk to something else - run slick and see what happens  - or else - close slick and rename vslick.sta to something else - run slick and see what happens.
Another thing to try  - in the context menu select "edit this menu", make a minor change to the menu to force it to be reloaded, see if it helps.
7
SlickEdit® / Re: Making the Build window just another tab
« Last post by LBCEi on June 17, 2021, 12:16:29 am »
Maybe I should start another thread, but I'm still plagued by not being able to get rid of the .process buffer.  The context menu in the build menu is stuck with this option on and I can not turn it off.

Suggestions?  Any way to turn this off with a def_... option on the command line?  I searched the user.cfg.xml for 'build' and 'process' and didn't see anything that looked relevant.
8
SlickEdit® / Re: is the plugin mechanism useable in 25.0.2
« Last post by Graeme on June 16, 2021, 11:52:05 pm »
A question  - if I need to shut down xretrace before the plugin is loaded so that the timer callback doesn't misbehave, is the definit and _on_load_module_xretrace that I have below ok for this.

Code: [Select]

void _on_load_module_xretrace(_str module_name)
{
   _str sm = strip(module_name, "B", "\'\"");
   if (strip_filename(sm, 'PD') == 'xretrace.e') {
      xretrace_kill_timer();
      xretrace_clear_all_markers();
   }
}

definit()
{
   //myerror();
   if (arg(1)=="L") {
      //If this is NOT an editor invocation
      xretrace_load_config();
      xretrace_kill_timer();
       //buffer_history_suspend = true;
      // this shouldn't be necessary because _on_load_module does it
      xretrace_clear_all_markers();
      buffer_retrace_cursor_list._makeempty();
      buffer_retrace_modified_lines_list._makeempty();
      buffer_bookmark_list._makeempty();
   }
   files_active_since_startup._makeempty();
   retrace_no_re_entry = 0;
   goback_is_loaded = false;
   if (def_xretrace_no_delayed_start && !file_exists(_ConfigPath() :+ 'DontRunMyMacros.txt')) {
      init_xretrace();
      xretrace_not_running = false;
   } else {
      xretrace_not_running = true;
      xretrace_has_been_started_id = 0;
   }
}

_command void xretrace_kill_timer() name_info(',')
{
   if ( retrace_timer_handle != -1 ) {
      _kill_timer(retrace_timer_handle);
      retrace_timer_handle = -1;
   }
}

9
SlickEdit® / Re: WRT set-bookmark
« Last post by Graeme on June 16, 2021, 11:40:21 pm »
I use this, plus the built-in toggle-bookmark.


_command void my_set_bookmark() name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_READ_ONLY)
{
   set_bookmark(get_bookmark_name());
}
10
SlickEdit® / WRT set-bookmark
« Last post by jporkkahtc on June 16, 2021, 09:51:20 pm »
What is the difference between
Code: [Select]
set-bookmark -q
set-bookmark -r
?

set-bookmark -r creates a bookmark named "-r"
set-bookmark -m creates a bookmark named "-m"

I was looking for a command I can bind to a key that would simply set, delete, or toggle a bookmark - without worrying about names or anything. Just mark the spot.
This would be a lot like setting breakpoints.
(Maybe I should just use breakpoints?)
Pages: [1] 2 3 ... 10