LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Macintosh application menu item

I have built a labview application for the Mac. Let's call it Application 1.

When I run the executable, the menu bar has a menu called Application 1 between the apple menu and the File menu. That's fine, BUT when I pull down the menu the first item is "About Labview"!!! Furthermore, when I select About Labview it brings up my About Application 1 front panel which I created for the Help menu. To make matters even worse, when I click on OK it doesn't close even though it does when I initiate it from the Help menu.

I can't edit this menu item in the Labview menu editor because Labview doesn't think it is there. I don't want to have About Labview appear in the menu, and I want my About Application 1 vi to behave properly.

Any advice?
0 Kudos
Message 1 of 24
(3,718 Views)
Hello,

I have been working on reproducing this issue on my Mac, but have not had any success. Can you verify that when you set your runtime menus back to default that everything then behaves as expected? That is, your custom menu should be gone, and all menus are back to normal? If that works ok, then I would suggest double checking to make sure that you are editing the correct .rtm file.

If it still looks like everything is setup properly, and there is still no explination for this extra menu option, I would suggest posting your VI and the assocated .rtm file so that we can take a look at it. It would also be helpful to know exactly what verion of LabVIEW, and which version of Mac OS you are using.

Scott Y
NI
0 Kudos
Message 2 of 24
(3,700 Views)
Scott,

thanks for your interest.

I am running Labview 7.1 and Mac OS X 10.3.8 on a Powerbook G4.

I cannot post my VI for business reasons (and also, it is huge) but I created a tiny application which I think demonstrates the situation.

I am posting an Archive.zip file which contains the executable, the source, the rtm file and the build file. The little app just has two menus (File and Help). Under file is Quit and under Help is About.

I would appreciate your looking at this.

David
0 Kudos
Message 3 of 24
(3,695 Views)
Hi David,

It turns out the short answer is: Name your SubVI so that it doest not have the word About it in.

The following KB describes how to replace the default LabVIEW help with your own custom About screen:

How Can I Add an "About" Screen for an Executable Built with the LabVIEW Application Builder

As far as how this impacts your application there are two options for the behavior of the About LabVIEW menu option. If you would like to leave the default LabVIEW about screen intact, all you will need to change in your current VIs is the name of the about.vi. If you name it to anything that doest not have the word about in it, the VI will no be run when the About LabVIEW selection is made.

The reason it would run but not close properly before is that the VI was loaded in memory and waiting to run as a SubVI in your main application. If you would like both your Help>>About selection and the About LabVIEW selection to point to the same VI, you will need to call the SubVI in your application dynamically so that it is not automatically loaded into memory. More information on one way to call a VI dynamically is available in this tutorial.

Calling a VI by Reference

Please note that you will need to add the VI as a dynamic VI under the Source Files tab of the Application Builder.

Scott Y
NI
0 Kudos
Message 4 of 24
(3,673 Views)
Scott,

Thanks for your continued help and patience. I followed your advice and changed the call to my About.vi to a call by reference, and the build script to indicate that it was a dynamic vi.

Unfortunately, the result is exactly the same. When called from the Help/About menu it works fine. When called from the "My Application/About Labview" menu, the quit button on the screen doesn't work. See the attached archive.

But there is a more fundamental problem. I don't want my users to even see an "About Labview" menu item. It is none of their business that the application was developed using Labview. Are you aware of any way that I can get rid of the "About Labview" menu item on the "About My Application" menu? I realize that this is more a Mac OS issue than a labview issue. I haven't gone to Apple support yet because I want to exhaust all of the possible solutions from within Labview.
0 Kudos
Message 5 of 24
(3,667 Views)
Section 12.A.1 of the license agreement pertains here. It says:

"You include the following copyright notice “Copyright ©[yr] National Instruments Corporation. All Rights Reserved” in the Authorized Application’s About Box and in the applicable written documentation distributed with each copy of the Authorized Application (you may include your own copyright notice with the foregoing notice);"

NI may have made it impossible to avoid having an About menu item. It would certainly help them for end-users to see what kind of programs are possible with LabVIEW.
0 Kudos
Message 6 of 24
(3,654 Views)
Licensing issues aside, I find it exceedingly strange that in Windows I can create an executable which has no reference to Labview but on a Mac OS X machine I cannot.

Just so we are clear about what I am talking about, look at the attached screenshot. Notice the About Labview...
item under the My Application menu in the upper left portion of the screen.


David
0 Kudos
Message 7 of 24
(3,640 Views)
David,

I believe the reason the About LabVIEW version of the dialog box was not closing properly was that you were not properly disposing of your reference in the top-level VI. I have made a couple of small changes and attached a modified version of your application to this post.

As far as removing the About LabVIEW text, you are correct that this is more of an Apple question at this point. As this menu is something that is built into all executables made by the application builder, you would need to edit the resources for the executable to make any changes. I have made a couple of attempts to edit this executable, but have not been able to find where this text is defined.

The best I can suggest beyond using the methods implemented in the attached example is to create a product suggestion sp that out R&D department will considering modifying the menu in a future version of LabVIEW. This can be done through our Product Suggestion web site.

Scott Y
NI
Message 8 of 24
(3,623 Views)
Scott,

thanks again for your interest and assistance. After making your suggested changes I can indeed get the About.vi application to work properly from both the Help menu and the MyApp menu.

That still leaves the issue of the About Labview text in the MyApp menu. I, too, have been searching high and low to try to find that text. I have also done what you suggested and filled out a formal suggestion to NI development. Obviously, Labview knows where it is and it would seem to be a fairly simple matter to expose it to the programmer through either a vi or a new entry in the build script. (Or better yet just substitute the string "MyApp" for "Labview")

I am also reading Macintosh developer documentation. There is a LOT! I have some clues as to where to look. If I find out how to do this I will post it here in case others are interested.

Regards,

David
0 Kudos
Message 9 of 24
(3,616 Views)
OK, resurrecting a two-year-old thread with the same question: How can I change "About LabView..." in my Mac application's menu to be "About MyApp...", when building a stand-alone? I've figured out how to get my About box to come up--I just need to know how to change the menu.

Thanks.
0 Kudos
Message 10 of 24
(3,337 Views)