LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using UNDO (ctrl-z) in Built applications

Greetings All,

It appears that Undo can be used in built applications but there are some
strange conditions for its use.
The Top level vi must be using the default menus and the 'show menu bar'
option must be unchecked. This has proven to be a difficult thing to get
around in a application where you want to be able to use custom menus. I
have actually found a solution but it involves creating a fake Undo menu
entry. The fake Undo is caught and then the menus are switched to the
default, a CTRL-Z keystroke must then be generated which produces the real
Undo functionality. Finally the original menus are reinstated. Not pretty
but I am at a loss to find another way. Is there something I am missing
here? Why would NI put th
is powerful feature into the runtime and then
handicap it this way?

Thanks,

Mike Sachs
Intelligent Systems
Message 1 of 14
(5,276 Views)
> It appears that Undo can be used in built applications but there are some
> strange conditions for its use.
> The Top level vi must be using the default menus and the 'show menu bar'
> option must be unchecked. This has proven to be a difficult thing to get
> around in a application where you want to be able to use custom menus. I
> have actually found a solution but it involves creating a fake Undo menu
> entry. The fake Undo is caught and then the menus are switched to the
> default, a CTRL-Z keystroke must then be generated which produces the real
> Undo functionality. Finally the original menus are reinstated. Not pretty
> but I am at a loss to find another way. Is there something I am missing
> here? Why would NI put this powerful feature into
the runtime and then
> handicap it this way?
>

If your custom menus contain the LV menu item, you shouldn't need to do
all this. To designate that it is the LV menu item, make its tag
APP_UNDO or whatever the built-in menu item's tag is.

In otherwords, a custom menu can be a mix of built-in and custom items.

Greg McKaskle
Message 2 of 14
(5,276 Views)
Well I certainly hoped that it would have worked that way (i.e. mixed
menus).
In my experiments I could only get APP_UNDO to work in a built application
by setting the vi to use the default
menus and also unchecking the 'show menu bar' option, thus I came up with
this convoluted approach.
I did a search for UNDO in built applications and it appears that most
people are of the opinion that the UNDO
functionality was not included in the run-time. Is it possible that I am
dealing with a feature that is not supposed to exist yet?

"Greg McKaskle" wrote in message
news:A0K0b.1015$vA5.80267@twister.austin.rr.com...
> > It appears that Undo can be used in built applications but there are
some
> > strange conditions for its use.
> >
The Top level vi must be using the default menus and the 'show menu bar'
> > option must be unchecked. This has proven to be a difficult thing to
get
> > around in a application where you want to be able to use custom menus.
I
> > have actually found a solution but it involves creating a fake Undo menu
> > entry. The fake Undo is caught and then the menus are switched to the
> > default, a CTRL-Z keystroke must then be generated which produces the
real
> > Undo functionality. Finally the original menus are reinstated. Not
pretty
> > but I am at a loss to find another way. Is there something I am missing
> > here? Why would NI put this powerful feature into the runtime and then
> > handicap it this way?
> >
>
> If your custom menus contain the LV menu item, you shouldn't need to do
> all this. To designate that it is the LV menu item, make its tag
> APP_UNDO or whatever the built-in menu item's tag is.
>
> In otherwords, a custom menu can be a mix of built-in and custom items.
>
>
Greg McKaskle
>
Message 3 of 14
(5,276 Views)
I also just found what Michael has noted re the Application Edit menu undo and redo items not working in a LabVIEW runtime when they are made part of a custom menu. Selecting the menu item tag to be APP_UNDO or APP_REDO doesn't help. It all works fine from the development environment.
0 Kudos
Message 4 of 14
(5,276 Views)
I am running into this bug, too, and have found the same result that removing the menu bar completely returns the Undo command. This would be fine for me; however, Ctrl-P and Ctrl-Q for Print and Quit no longer work with this method, and I also need those. Making a custom menu doesn't seem to work either.
I am running LabVIEW 7.0. Has this been fixed in LabVIEW 7.1? I am suprised that a NI support engineer has not responded to this thread.
0 Kudos
Message 5 of 14
(5,277 Views)
Hi..Did u find solution to undo redo application problem?
0 Kudos
Message 6 of 14
(5,042 Views)
filozof,
It turns out that that this functionality wasn't intended to be supported in built apps. Thanks for checking up on it!
 
Chris C
0 Kudos
Message 7 of 14
(5,023 Views)


@filozof wrote:
Hi..Did u find solution to undo redo application problem?


I'm not sure what you would want to undo in an application. Most undo actions that you can do are on edit level of VIs and a built application has no way of editing a VI at all so there is not much you can undo. The few undo actions that you could do on data level would not really justify a complete undo implementation in a built app IMO as it would mostly not know what to do for the app in particular and undo operations would have to be implemented in an application specific way. So I never would have expected for the built in undo to do anything in a built app at all (but I did implement a primitive undo several years ago myself for one app but it doesn't get nice to do).

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 14
(5,014 Views)

People who use our applications actually expect this.

 

For example if you zoom in a graph, and want to quickly unzoom this is what you will use.

 

This is a handicap and should be considered a bug of LV...

 

Can you please enable this feature in Runtime apps as it is very User Friendly.

0 Kudos
Message 9 of 14
(4,604 Views)

Hello,

 

I know this thread is "old" but is anything going to be done with this functionality.

It is great to be able to use the undo to Zoom in and out of graphs,

or quickly change the mistakes or a few steps in configuration windows of an applicaiton before you press the apply button, to kind of back track your steps.

 

Please can you recognize this as a bug and make this feature availible in LabVIEW?

 

Regards,

M


0 Kudos
Message 10 of 14
(4,525 Views)