SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jorick on June 26, 2008, 01:41:00 PM

Title: Codewright style activation of windows
Post by: jorick on June 26, 2008, 01:41:00 PM
I'm a previous Codewright user and I'm used to the editor activating a window and moving the cursor to the click location with only one click.  SlickEdit, on the other hand, activates the window but doesn't move the cursor.  A second click is required to do that.

This is very confusing to me, especially when I'm working with two windows, cutting and pasting text between them.  I'll sometimes forget the extra click and the pasted text will go into the wrong location.  Or I'll forget that I'm already in the window and triple click a word and end up selecting the entire line.  I can't seem to get used to this.

Is there any way to have SlickEdit move the cursor to the click location when the focus moves to a new window?  Also, can that be done when focus moves from a different program to SlickEdit?  I don't see any options setting to do this.
Title: Re: Codewright style activation of windows
Post by: jph on June 26, 2008, 02:43:57 PM
Actually, I like the current behavior, which lets me click on a window to give it focus without having to worry about changing where I was editing.  So I would request that if a change were made, it be configurable.
Title: Re: Codewright style activation of windows
Post by: jimlangrunner on June 26, 2008, 03:09:32 PM
I'm a former CodeWright user as well, and there are quite a few things that I miss.  I've found that most of the things I miss I've found workarounds for or have learned to live with the change.  After 3 years, it's a lot easier to live with Slick as it is. 

I'll second jpb's comment and state that I like the current behavior.  It's how most other software that I use works (try that in Word, for instance) and I'm big for consistency in my apps.

That said, there are quite a few macro wizards in the forums that may know how to modify Slick's behavior with a macro to cause the behavior you desire.

jim.
Title: Re: Codewright style activation of windows
Post by: jorick on July 02, 2008, 12:54:17 PM
Any macro wizards out there that can help me?  Thanks!
Title: Re: Codewright style activation of windows
Post by: MindprisM on July 12, 2008, 10:31:14 PM
This should work:


file: C:\SlickEdit2007\macros\stdprocs.e
insert code line below:   // INSERT THE LINE BELOW
Code: [Select]
void _on_got_focus()
{
   if (command_state()) {
      if (p_object==OI_TEXT_BOX) {
         if (p_window_id==_cmdline ||
             !p_auto_select || p_ReadOnly || p_style==PSCBO_NOEDIT ||
             !def_focus_select
             ) return;
         p_MouseActivate=MA_NOACTIVATEANDEAT;
         _set_sel(1,length(p_text)+1);
      }
      ArgumentCompletionTerminate();
      return;
   }
   ArgumentCompletionTerminate();
   // INSERT THE LINE BELOW
   p_MouseActivate=MA_ACTIVATE;
<original function continues...>

load the modified file <macro,load module>
Title: Re: Codewright style activation of windows
Post by: MindprisM on July 12, 2008, 10:35:20 PM
Change it back with:
p_MouseActivate=MA_NOACTIVATEANDEAT;
Title: Re: Codewright style activation of windows
Post by: jorick on July 25, 2008, 02:53:51 PM
Sorry for the delay but I didn't realize that there was a reply.

The change you suggested works when I change from an application back into SlickEdit (thanks!  :) ), but it doesn't work between SlickEdit windows.  Is there another place I can change to allow mouse clicks to be applied between SlickEdit windows?

(I clicked "Notify me of replies" so I'll know when there's a reply.)
Title: Re: Codewright style activation of windows
Post by: jorick on September 19, 2008, 03:53:44 PM
I really need a solution to this problem.  This bug is starting to cost me time at work.

I double clicked in an unselected window to select a word that I wanted to copy.  However, since the window was unselected, it really required a triple click to select the word.  Instead of copying the word, it somehow copied half the source file.  I went back to the first window and did a paste but didn't see exactly what was pasted.  I then moved to a different part of the file and continued editing.

I didn't see any problem until I tried to compile.  I got numerous errors and only after a few minutes of searching did I find that what I copied was not what I pasted.  It took quite a while to determine what was real code and what was accidentally pasted.  Even now, I'm not sure if my source code is totally fixed (it compiles but some parts may be out of date).

This is nonstandard operation.  Every other editor I've ever used would change the focus and process the mouse click at the same time.  I use SlickEdit along with a number of IDE editors, and I cannot learn to add a mouse click in SlickEdit when I change edit windows.  The above mentioned fix only applies when I switch to SlickEdit from another application.  It doesn't work between windows within SlickEdit.

Please, somebody tell me how to get SlickEdit to process the click when I switch edit windows.
Title: Re: Codewright style activation of windows
Post by: Rodney on September 19, 2008, 04:14:10 PM
We snuck a feature in to the 13.0.2 update that allows you to turn on "Place cursor on focus click" from Options>Editing>Editor Windows. It is, of course, off by default.

This is not a macro fix, so you will have to be on v13 and patched up to 13.0.2 to get this feature.

--rodney
Title: Re: Codewright style activation of windows
Post by: jorick on September 22, 2008, 01:58:50 PM
THANKYOUTHANKYOUTHANKYOU!!!

This is exactly what I need!

You guys are great!
Title: Re: Codewright style activation of windows
Post by: xj97 on September 22, 2008, 03:45:46 PM
I actually liked the new Slick version of this behavior better, but it's cool to have the option to play with.

BUT, what I do miss is having a file I'm dragging over to Slick open up in the window that the mouse is over when I release the button (Codewright did this, if I recall correctly).  :)  Slick stuffs the file into the last activated window.  Maybe there is an existing way to remedy this?

b