SlickEdit Product Discussion > SlickEdit®

activate_tool_window() activates SlickEdit when it is not the active window

<< < (2/4) > >>

rowbearto:
Just took a closer look at showResults() and see it is calling "activate_window()" and not "activate_tool_window()".

Still the search results is making SE grab the focus when I don't want it to.

How to fix that?

rowbearto:
Perhaps the activate_window() function should not have SE grab the focus, but only activate the window within SE withing having the entire SE grab the focus?

Looks like activate_window() is a builtin so not hot fixable?

rowbearto:
I tried a long search and at the end SE didn't grab the focus.

However my macro which calls showResults() inside of SearchResults.e - that does seem to grab the focus, don't understand why?

Also shouldn't the default value of set_focus in the call to activate_tool_window() be false and not true? I see many calls to activate_tool_window() in se macros without setting set_focus to false?

Dennis:
There is an active_tool_window() deeper down the call chain in showResults().  I can put in a fix for this.  Thanks for the specific test case, things like this are really difficult to track down without some starting point to reproduce it.

rowbearto:
Thanks Dennis.

That will fix this instance, but what about others? I recollect SE taking focus other times but I wasn't looking out for when.

Maybe the best solution is to change the default of set_focus in activate_tool_window to false?

Otherwise we are going to end up tracking down many activate_tool_window() that are setting the focus?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version