I recently contacted NI support about a -bug report regarding the documentation of the function "Insert menu item".
It declares int he help that the values for "Item Name" is the string which appears in the menu and "Item Tag" is the unique Identifier for the menu item. If only Tag is wired, the names are created automatically otherwise they take the values input on the terminal "Item Names".
I was a bit surprised when a bit of my code behaved differently than I had expected. Apparently an empty string for "Item Name" is NOT created, even if I provide a perfectly valid "Item Tag".
I think this kind of thing needs to be mentioned in the help. I don't want the behvaiour changed because it's actually a cool feature for what I'm doing but I can't reconstruct the real behaviour of the node from the help alone...... Nowhere is the difference in handling of an empty string as opposed to a non-empty string even mentioned.
Am I being too pedantic on this?
Concerning the Empty String Item Name that doesn't get created.
Did you get in touch with an Applications Engineer about that?
Because at my side (in 2014) it does seem to get created.
Or am I misunderstanding the test you are doing?
I was indeed in touch.
I was just told today that a CAR was opened, CAR 505080.
If it works in LV 2014 (which I haven't installed anywhere yet), then I suppose the idea of a CAR is kind of silly.
PS My problem was when dealing with the shurtcut menu of a control (run-time menus and so on). In that example (where there is no menu bar as in your example) passing an empty string led to the item NOT being created. A slight difference is also that I did provide valid item tags for all elements.
With the right-click shortcut menu I can indeed reproduce similar behaviour.
However, at my side something else does also happen.
If you have x subsequent "empty string" item names, then it replaces those x subsequent "empty strings" by one separator.
I want to make sure this is the same behavior you are seeing.
Hmm, the seperator being added seems to be a new feature. Did you also provide valid item Tags even for the entries which had empty item names?
On my tests (LV 2012 SP1), these items were thens imply not added, no separator, nothing. Trying to edit the items afterwards confirms that the items are not there (Error, items not found).
Yes, I did provide the item Tags.
Thanks for your feedback!
I just was asking some more questions out of personal interest. 🙂