jacobson3 / VI-Peek

MIT License
4 stars 3 forks source link

Decide how to Launch/Close Peek Window #10

Closed jacobson3 closed 2 years ago

jacobson3 commented 3 years ago
qalldredge commented 3 years ago

It could be all three. Is it possible to override the Navigation Window? If yes, IMO, do that. Otherwise, do the Tools Menu and Quick Drop.

jacobson3 commented 3 years ago

One of my original designs for this project involved overriding the navigation window so it can be done (it's just a password protected llb I believe). I know I can definitely launch the project but I would have to look at how to close an open window with Ctrl+Shift+N.

The solution I'm looking at would be to have an INI token that would basically switch between launching the default navigation window and this peek window. If that works it might be good to have something in the tools menu to switch this INI token value.

qalldredge commented 3 years ago

Sounds awesome. You probably already know but the Navigation dialog is found at: [LabVIEW 20xx]\resource\dialog\zoom_out.llb

jacobson3 commented 2 years ago

@qalldredge I attached a modified zoom_out.llb which should be a good first pass at having a quality launching behavior. By pressing Ctrl+Shift+N you will be able to launch and close the VIPeek window as long as you have the following two INI tokens.

vipeekEnabled=true
vipeekWindowPath="<PATH>\VI-Peek\source\Peek Window\Main.vi"

The first token "enables" the VIPeek window. When the token is not present or set to false, it will simply launch the navigation window like it always does. If the token is set to TRUE then it will run the VI whose path corresponds to the second token (if the token is not found it will just launch the navigation window, eventually that should point to the installed location of VIPeek but having this token makes testing updates easy as you can just point to the VI in SCC).

I want to wait to add this to any branch because there are also two changes that will need to be made that are small but will conflict with your OO-Types branch.

  1. You'll need to change the access scope of Main.vi to public. Ideally pressing Ctrl+Shift+N would actually call the Start Module.vi function but I couldn't get that to work very reliably (often it would just lock the library but Main.vi wouldn't be running).
  2. If you launch the tool and immediately select any VI, the peek window will throw an error. This is because the app reference will be null until a VI activation occurs so you'll have to select a window that you didn't launch the peek window from to get a valid app reference. The zoom out llb gives access to the app reference of the VI you're launching it from so an easy solution would just be to add a FP item and set that control value when the peek window is launched to initialize the app reference correctly.

Once that's resolved I think the only other decision is whether the peek window should be launched while minimized or whether it should be launched in the previous location but with no embedded BD.

zoom_out.zip