LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I generate a boolean output whenever I abort a VI?


@CharlesDel wrote:

After checking my conclusion is:

as well 'panel.Close ?' 'as   'app.close ?' event will be triggered if quiting via 'File-> Close',

but it won t react via the 'X' , nor if process is stopped via task manager, nor if LV is closed.


Disallow user to start or use task manager (manage user rights) - 2/4

Don't allow close of LabVIEW - 3/4

Don't allow close of panel ('X') - 4/4

 

Still, if you pull the plug (cut the power), you need the hardware to react properly. Depending on the situation, the person(s) who made the system might be liable if, for instance, the cleaner gets injured after turning off the system. (S)he won't be the first... 

Message 21 of 33
(978 Views)

@CharlesDel wrote:

After checking my conclusion is:

as well 'panel.Close ?' 'as   'app.close ?' event will be triggered if quiting via 'File-> Close',

but it won t react via the 'X' , nor if process is stopped via task manager, nor if LV is closed.

Solves thus 1 over 4 abort possibilities, not bad, but not a full solution.

 

Might want to explore either 'wiebe'  s suggestion, either the one with the hardware sending periodic messages, but as I said I m not sure how to implement any of both those at this time.

 

Thanks.


Panel.close fires for me by 'X', how do you manage to not get it? 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 22 of 33
(971 Views)

@Yamaeda wrote:

@CharlesDel wrote:

After checking my conclusion is:

as well 'panel.Close ?' 'as   'app.close ?' event will be triggered if quiting via 'File-> Close',

but it won t react via the 'X' , nor if process is stopped via task manager, nor if LV is closed.

Solves thus 1 over 4 abort possibilities, not bad, but not a full solution.

 

Might want to explore either 'wiebe'  s suggestion, either the one with the hardware sending periodic messages, but as I said I m not sure how to implement any of both those at this time.

 

Thanks.


Panel.close fires for me by 'X', how do you manage to not get it? 🙂


Probably the 'X' doesn't match the Panel close event's VI? Closing the main won't trigger Panel Close? in floating windows (or vice versa)!

 

If you don't want users to close panels, disable it... It's bad UI design to enable it, and discard the action if it's used. 

 

Panel Close? even is useful to gracefully handle 'X'. For instance, making 'X' the same as pressing cancel, or menu File>Exit.

0 Kudos
Message 23 of 33
(967 Views)

wiebe@CARYA wrote:

Probably the 'X' doesn't match the Panel close event's VI? Closing the main won't trigger Panel Close? in floating windows (or vice versa)!

 

If you don't want users to close panels, disable it... It's bad UI design to enable it, and discard the action if it's used. 

 

Panel Close? even is useful to gracefully handle 'X'. For instance, making 'X' the same as pressing cancel, or menu File>Exit.


True, you need to handle the panel event in all VI's that should handle it. But by pressing the X in the upper right corner of a windows i Always get the event, anyhow.

I've often used X as cancel, as it's pretty intuitive. Floating windows is a problem, but if you Close the main windows with X, will it send app.Close to Child windows? (Why do the forum randomly capitalize Words?)

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 24 of 33
(960 Views)

@Yamaeda wrote:

windows? (Why does the forum randomly capitalize Words?)

I don't see that happening to me.  Are you typing on a phone or a PC?

0 Kudos
Message 25 of 33
(948 Views)

@Yamaeda wrote:
Floating windows is a problem, but if you Close the main windows with X, will it send app.Close to Child windows? (Why do the forum randomly capitalize Words?)

No. At least not in my quick test. Not in general, but if you're only exe window is the main, floating windows might get the event because they are closed because they're the only windows left. Normally this isn't a close, but more like a hide. I don't get a Panel Close? if a floating window hides when for instance another application activates.

Message 26 of 33
(936 Views)

@RavensFan wrote:

@Yamaeda wrote:

windows? (Why does the forum randomly capitalize Words?)

I don't see that happening to me.  Are you typing on a phone or a PC?


PC.

Like the Words in this sentence is automagically capitalized, like i'm german. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 27 of 33
(913 Views)

That is odd.  I'd be curious to hear if anyone else says the same thing happens to them.  I'd suspect some sort of keyboard problem.

 

My first thought was phone because I know on mine, if you hit a period, it will automatically turn the next letter into a capital when you type it since it thinks you are starting a new sentence.  And that would make sense for "app.Close" having Close capitalized.

0 Kudos
Message 28 of 33
(902 Views)

If I turn my keyboard to Dutch, I get all kinds of shortcuts: "a > ä, 'e > é, ^ > ê, etc. We use é and ë occasionally. But I "quote" text more often...

 

Sadly, Windows decides to switch keyboard automatically, and makes it near impossible to delete the keyboard. I tried, and ended up with 0, then 4, and each update it's wait and see if you have to start over again. I learned to have ENG and NLD keyboards, and how to switch. This got easier in W10, before W10 it was near impossible. W10 made this hole experience much better.

 

But if this is your problem, you should see this in the task bar. And you'd have the problem in other applications as well. If not, it must be a forum thing.  

0 Kudos
Message 29 of 33
(895 Views)

Hmm, i see i can r-click the word in the reply and choose "don't correct 'word'" so now word should be written as i write it! (yay \o/ )

So it definatly seems like some forum setting/stuff/problem.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 30 of 33
(889 Views)