VLF-ONE uExecute method invocation

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
davidbalansa
Posts: 92
Joined: Mon Feb 01, 2016 10:08 am

VLF-ONE uExecute method invocation

Post by davidbalansa »

I have noticed in VLF-ONE, if a command handler is open (current command handler) and then its command tab is clicked again. The uExecute method of the command handler is executed again. I have recreated the same scenario in VLF-WIN and the uExecute method does not invoke if I click on the command tab of the current command handler. I think the VLF-WIN is what the user would expect to happen.

The uQueryCanClose method does not execute to allow you to capture the event. I am finding I have to put logic into all my uExecute methods to avoid executing the logic in uExecute in this instance, otherwise my initialize logic clears out the command handler and the user loses their changes.

Is this expected behaviour in VLF-ONE?
Capture1.JPG
Capture1.JPG (21.3 KiB) Viewed 5983 times
David
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE uExecute method invocation

Post by MarkD »

Hi David - yes that is acting as designed (same as VLF-WIN I think). If your command handler is sitting on "dirty" unsaved data then you need to check for that in both contexts - whenever your are asked to execute a command, or when you are asked to close.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE uExecute method invocation

Post by MarkD »

See attached DF_T42H2O reusable part's method uCheckUnsavedChanges for an example of how this might be done.
Attachments
QuickExport20170130101210.zip
(13.85 KiB) Downloaded 916 times
Post Reply