11-06-2006 04:45 PM
05-16-2007 10:20 AM
Using this method it is easy to change the run-time menu of a control - but I have a need to restrict the menu items of the plot legend and can't seem to get to the run-time menu option for this sub-item of a graph.
Is there actually a way to get to this menu?
I'd rather not have to build a whole custom Plot Legend myself.
05-17-2007 02:04 PM
03-15-2013 03:13 PM
A lot of issues with the shortcut menu would be solved by allowing the 'MenuRef' to be accessable from any Event Structure assigned to that control. Having the ES fire 2x for a single event is odd. And creating a local variable just to retain what menu selection the user made from the "Menu User Event" state - so it can be read by the "ShortCut Activation" event is wasteful of memory, especially when you have more than a few controls.
The fact that the average programmer cannot figure this out is an indication the implemenation is a bit off.
Also, the "ShortCut Activation" Event fires BEFORE the "MenuUser" Event so it out of synch. Meaning you create the menu BEFORE it checks exactly what the user selected?.
"Why make something difficult, when you can make it impossible..."
- J.Hamilton
03-16-2013 12:46 PM
I really don't understand your problem, nor why you bring it up in an old thread, but here are some comments:
03-16-2013 02:58 PM
These are new threads for everyone who discovers them for the first time!. I appreciate seeing a solution to any thread old or new.
I would agree on different experiences. I've been coding in LabVIEW for 26 years and spent lots to time fixing others code. I've seen assumptions or lack thereof, on using local vars, and FP references, not understanding 'inplaceness' taken to the extreme and then hear complaints about how 'inefficient' LabVIEW is. I open the diagram and there are 20 instances of a local variable for nearly each FP control.
This concern was expressed by another who posted on this thread. I really don't write simple little LV programs anymore, I write big complex ones. So a seemingly simple 'just throw some more local vars on it' don't scale well for all applcations.
NI should strive to make their implementation as lean as possible. As now computers are scaling down now to hand-held tables and devices running on ARM processors. Which don't handle bloat code well.
It's not a nice day when you realise that these minor issues when scaled up can bring your code to a halt. You have to start rethinking, I just don't code that way anymore. I code as if it's going to run on the least performance processor.
So please respect others perspective as I do yours.
Keep wiring! Regards
J.Hamilton
03-16-2013 03:29 PM
I respect other people opinions just fine. I just don't understand the problem.
As for architecture, designing for efficiency is certainly desirable, but you have to know where and when things will really have an impact. As I said before, if you have memory problems, the solution will not come from getting rid of a few simple memory allocations, but I'm sure you already know that.