01-22-2018 09:04 AM
Hello, I'm experimenting for the first time with customizing my context menu (right click on a numeric variable).
In the specific I am trying to add a context menu to a numeric control that is inside an array (actually in a array of clusters, but I can reproduce the "problem" also in the simplified way that I'm attaching here).
I can trigger the event "context menu activate" with the reference of my element, but I can't trigger the event "Context Menu Selection" on my custom element. Why? What am I doing wrong?
The event must be catched by the dynamic event registration because the VIs where I want to implement this feature are quite complicated and also for scalability reason (the idea is to scan all the elements in the VI, included array elements and cluster elements, in order to have the reference of all the numeric controls in the VI)
Thank you for the help.
Solved! Go to Solution.
01-22-2018 10:42 AM
Interesting. Seems to be a bug.
Where I am unsure is which part is a bug. The fact that the Menu activation works on an Array Element actually surprises me, but if that works, then I suppose the menu selection should also. But I see the same behaviour you describe. Doesn't feel right to me at all. Report it as a bug and see what NI tells you.
Shane
01-22-2018 11:02 AM
Try inserting a "Delete" Menu Items before the custom menu. It seems to work then.
mcduff
01-23-2018 01:43 AM
Do you mean like this (see version attached)? It doesn't change anything to me (LV 2015 SP1)
01-23-2018 02:29 AM
So far i've not succeded with your file either, i added a fixed Menu selection event and that works fine ... Hmm, this reminds me of an old issue, i'll test for it.
/Y
01-23-2018 04:04 AM
@cassaniti wrote:
Hello, I'm experimenting for the first time with customizing my context menu (right click on a numeric variable).
In the specific I am trying to add a context menu to a numeric control that is inside an array (actually in a array of clusters, but I can reproduce the "problem" also in the simplified way that I'm attaching here).
I can trigger the event "context menu activate" with the reference of my element, but I can't trigger the event "Context Menu Selection" on my custom element. Why? What am I doing wrong?
The event must be catched by the dynamic event registration because the VIs where I want to implement this feature are quite complicated and also for scalability reason (the idea is to scan all the elements in the VI, included array elements and cluster elements, in order to have the reference of all the numeric controls in the VI)
Thank you for the help.
This should answer all topics in your post, Context menu 2 nested deep and all Cluster and Array references 3 nested deep.
Main VI is "ContextMenu.vi" in Zip Folder.
01-23-2018 04:24 AM
@Jasch wrote:
This should answer all topics in your post, Context menu 2 nested deep and all Cluster and Array references 3 nested deep.
Maybe I'm a bit super slow today, but what exactly are you answering here?
01-23-2018 04:36 AM
Sorry but I also don't get it. I expect a PopUp when I click on my custom menu. I don't see that happen in your VI. Or am I wrong?
01-23-2018 05:06 AM
simplified solution, has all pop up click answers.
01-23-2018 05:14 AM
i know it works with the whole array.. the fact is that i need it only on the digital element like in the example that I attach you here.. that is not working for me....