Jump to content

jcarmody

Members
  • Posts

    951
  • Joined

  • Last visited

  • Days Won

    39

Posts posted by jcarmody

  1. More improvement request:

    • You should probably disable drag and drop tree item
    or, make it able to rearrange states! I hate the built-in method. I'll make it prompt the user in case the drag/drop was an accident.

    • The navigation key (while navigating the tree) do not change the visible frame

    I thought about that, too.

    I was thinking about making it handle Event Structures as well. I've got some work ahead of me. Thanks for the input.

  2. I have a couple of comments:

    • I think that using system controls would look a lot better than 3D control
    • Instead use this (because the ">" and "<" are only needed if you have SubMenu(s))

    CaseSelector : My_Menu_Tag

    • Additionally, it is recommend that you use some meaningful tag, so replace "My_Menu_Tag" by "Case_Selector_Tag" for example.

    Done, thanks for the feedback.

    * I'd get rid of the big "OK" button

    * It would be nice if the vertical scroll bar would auto-hide itself if it is not needed

    Done. I had added the OK button because I had always considered it bad practice to stop your program that way; it wasn't in the early versions. I agree though, it is nicer without it.

    CaseSelector.zip

    • Like 1
  3. [...] Maybe not today, maybe not tomorrow, but soon.

    "I'm saying it because it's true. Inside of us, we both know you belong with TestStand. It's part of your workflow, the thing that keeps production going. If that project leaves the ground and you're not with TestStand, you'll regret it. Maybe not today. Maybe not tomorrow, but soon and for the rest of your life." Casablanca

    • Like 1
  4. A very nice improvement! Here are more suggestions:

    • Its window should be set to "floating"
    • It should run as an asynchronous process -- it should not close its front panel after the user double-clicks on a value (you should probably invoke it with the VI.Run method so that it doesn't block the Right-Click Framework)
    • It should allow multiple instances -- make it reentrant so that I can use to work on two Case Structures at the same time.
    • It should make sure that the user actually clicked on a named cell (using the PointToRowColumn method) -- it is currently treating a double-click on the tree node expander ([+]/[-]) as a frame selection.

    Cheers,

    Done. I've changed from double to single-clicking and I couldn't see how to make the PointToRowColumn do what you suggested, but I've implemented the same effect.

    Now, how about some constructive criticism on my coding/style? Please? Thanks!

    CaseSelector.zip

    • Like 1
  5. Hey Jim,

    [...]

    • How about using a listbox (or tree) instead of a 1D array of strings?

    I've updated it to use a tree control. It indents states based on the presence of "-------" in the state name (ala JKI State Machine) assuming that these are section headers. Everything between them will be indented from the previous header and structures without this format will be presented without indenting anything. I also made it require a double-click to select a state so it would still be possible to expand/contract sections. The position of the scroll bar is persistent between calls (for the same Case Structure), but all sections are always presented expanded.

    CaseSelector.zip

    • Like 2
  6. I can think of a couple additional features and usability improvements. For example:

    • How about using a listbox (or tree) instead of a 1D array of strings?
    • The window should be resizable and the list should auto-grow with the window (this might not be possible with 1D array)
    • I used a Table with only one column visible (because it scrolls with the mouse wheel and the Array indicator didn't). A colleague suggested using a Tree but I didn't know how it would apply to a non-JKI State Machine Case Structure. I'll probably add the functionality to handle both, at least until the rest of the world is converted. This was my first plug-in and I wanted to understand the process before trying to get fancy.
    • The window is resizable w/auto-grow (unless I botched that part of the llb, too).

    PS - JKI has considered creating some "helper tools" for the JKI State Machine. You might even see some demos at/around NIWeek that will BLOW YOUR MIND (I just had my mind blown this morning by some prototype stuff I saw).

    Alas, but I won't be at NIWeek. Is one of the helper tools, perhaps, the ability to right-click on the queue wire and insert an Add States To Queue? I'm going to do that if nobody else beats me to it. It'd probably be a good exercise for me.

    Also, I've added this to the List of Community RCF Plugins.

    Cool, thanks. Will I be able to update that when I fix the problem François had? (I had to copy/paste from his signature to get that "c" with the "5" underneath...)

    • Like 1
  7. I installed it and got problems. The RCF couldn't be used anymore without restarting it once I used your plugin. I think it doesn't like the continuous monitoring.

    How do you use it? Do you have the same problem I've seen?

    I had this problem, too, but THOUGHT I had it licked. There's a sub VI that presents the list and waits for a user input it never gets because the Front Panel never shows. I resolved the issue by setting the VI Properties to open & close the front panel as appropriate. It may be that an old copy made it into the zip file; I'll know more tomorrow when I get to the office in the morning (I'm currently restoring my laptop from a series of unfortunate events).

    I changed my approach and am not polling as I mentioned in the other thread. This one pulls the first element from the array of selected objects and tests to see if it's a Case Structure. If it is, it sends an array of frame names to the sub VI mentioned above. This has an event structure that waits until you select a state then returns the index to the RCF VI (which sets the VisibleFrame property).

    Thanks for trying this. I'll fix it tomorrow, but I think all it needs is the VI Property change.

  8. Would the Mouse Up event be a good time to check if a Case Structure has been selected instead of constant polling? I can think of no ways to select a case structure other than with a left-click or a "mouse down-drag-mouse up" combination. (unless selected programmatically of course).

    Doh! Duh... Thanks.

    I think I slapped my head too soon. I'm trying to detect that a Case Structure was selected in another VI so I need to detect an event at the Application level, no?

  9. Would the Mouse Up event be a good time to check if a Case Structure has been selected instead of constant polling? I can think of no ways to select a case structure other than with a left-click or a "mouse down-drag-mouse up" combination. (unless selected programmatically of course).

    Doh! Duh... Thanks.

  10. Polling...bummer. I really wish they would give us a mouse scroll event!

    I'm doing this as part of the work associated with this post. I wonder if I can detect that a Case Structure has been selected by some method other than polling. I'd still have to poll to handle scrolling through the long lists.

    This sounds like a topic for another post on the VI Scripting forum... I'll try to figure it out myself first.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.