LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Builder and Closing

Hi

Already, another problem has arisen. I have developed a simple VI with no big thing inside. I am using an event structure for handling button presses. To quit my application, I have one button, labeled Quit (who would've guessed) which quits the application. I simply wired that button to the quit terminal of the event structure (ok, to the quit terminal of the while structure around the event structure).
I have also built this application with  the Application Builder into a .exe file. I managed to get that Run/Pause buttons away. by checking the appropriate checkboxes inside AppBuilder. But now, what happens is as follows:
* I quit my application by using the red X of the window - everything closes down fine, the window disappears *perfect*
* I quit my application by using the button - the program stops, but the run button appears.

How can I avoid that behaviour?

Thanks for your advice 🙂
0 Kudos
Message 1 of 9
(3,285 Views)
You are just stopping the vi by using your "quit" button wired to the stop of the while loop.  This will not close the vi, even when built as an application, which is why you see the run button after you press quit.  Try using the Quit Labview vi in the Application Control Pallete

Kenny
Kenny

0 Kudos
Message 2 of 9
(3,273 Views)
There's a function in Application Control which is used to close LV once everything's done executing.  Be careful when using it while developing, as it will close all open vi's.  Granted you get the option to save them, but it's annoying nonetheless.

See the attached image


Message Edited by Novatron on 07-10-2006 11:17 AM

0 Kudos
Message 3 of 9
(3,273 Views)
Yep, I've seen the Exit VI but when I found out it closes even LabView during development I thought that this was not exactely what it was meant for. But if this is the only solution I'll have to stick with it. I'll try it out tomorrow.

Until then, thanks for your advice 🙂
0 Kudos
Message 4 of 9
(3,261 Views)
Well, you can either a) not put it in until you're ready to build your application, or b) use (lv8) a diagram disable structure around it until you're ready to build your exe.  If not lv8, then just use a case structure and wire a boolean constant to the selector, and put it in the opposite case, until you're ready to build.
0 Kudos
Message 5 of 9
(3,258 Views)

What is commonly done is to use the App.Kind property node and do the exit only if it's run-time.

Message Edited by Dennis Knutson on 07-10-2006 01:46 PM

Message 6 of 9
(3,257 Views)
Thanks for that Dennis.  Something I was (obviously) unaware of.

Always learning new things!
0 Kudos
Message 7 of 9
(3,244 Views)
Thanks, works perfectly 🙂
0 Kudos
Message 8 of 9
(3,226 Views)
Here is some related info from Jim Kring's blog regarding exiting applications:
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 9
(3,211 Views)