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?
David
VLF-ONE uExecute method invocation
Re: VLF-ONE uExecute method invocation
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.
Re: VLF-ONE uExecute method invocation
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 915 times