06-09-2016 09:07 AM
When creating your own shortcut menu, a "Replace Item Tag" function would be handy. Is there something like that around? (I mean really to replace an Item Tag, not the Item Name, which I saw is doable with the "Set Menu Item Info" function.)
The reason for my programmatic Item Tag replacement is, that I would like to replace the Item Tag in order to pass conditionally some information via Menu Item Tag over to the Event Shortcut Menu Selection (User).
To replace an Item Tag I see a two way step, by first removing an Item Tag and then inserting a new Item Tag. There's the "Insert Menu Item Function" with the "after item" connector. But what if the "after item" is an "app_separator", and I have several app separators? According to the Labview help, they should be unique: "You can insert a separator using the application tag APP_SEPARATOR. The function always ensures that the tags of all the inserted menu items are unique to the menu hierarchy by appending numbers to the supplied tags, if necessary."
-> So I would expect to see such appended numbers at the supplied tags, but i don't see them. Is this a bug or am I understanding something wrong?
I would like to have the 2nd App Separator as reference to insert a Tag, but as every App Separator comes out in the "item tags out" identically as "app_separator".
I found a workaround with the search in array of item tags and then use the previous Item Tag as "after item" to insert the new Item Tag in the same location where a deleted Item Tag was.
Any ideas:
(Attached is a vi example to play around with and the block diagram printscreens.)
06-10-2016 07:51 AM
Probably i have to shorten it a bit:
Why are there no appending numbers on the app separator strings at the output "item tags out" of the Insert Menu Function, as the Labview Help suggests it?
06-10-2016 07:57 AM
and here the front panel which shoes the item tags out indicators, all app separators without appended numbers...
06-17-2016 02:12 AM
At the very least this is a discrepancy between the function help and the actual workings of the code.
It's clear that the help mentions making each tag unique by possibly modifying it, but I simply do NOT see this behaviour in LV 2012 or 2015.