WinBatch® Technical Support Forum

Archived Boards => WinBatch Dynamic Dialogs => Topic started by: JTaylor on August 13, 2016, 04:27:55 PM

Title: Dialog() Function Issue
Post by: JTaylor on August 13, 2016, 04:27:55 PM
I tried to find the document listing when features were added but couldn't recall where that is located and couldn't find it so thought I would ask...

I have been switching things over to call the Dialog Function rather than putting the Dialog template in the body of my scripts, as discussed in another thread.  I have "include"d my dialog templates and am encountering an issue...the current pattern so far is that it works for 6.2 dialogs but gives me an error saying the Format variable cannot be found for 6.1 dialogs.  Is this expected?


Jim
Title: Re: Dialog() Function Issue
Post by: JTaylor on August 13, 2016, 04:31:24 PM
Hmmmmmmm...not sure that is the pattern after all.   Everyone of them I checked worked that way but went and converted one of them to 6.2 that was failing and it still fails.

Any suggestions on what would cause that error?

Jim
Title: Re: Dialog() Function Issue
Post by: td on August 13, 2016, 05:01:14 PM
For whatever reason your dialog template format variable could out of scope when your call the Dialog function to create the dialog causing the error.  Scope problems are usually the result of the scope rules imposed for UDFs.  For example, you would need to '#include' the template file in a UDF if you display the dialog while in a UDF.   

Another possibility is that you are missing the format variable from the dialog template because of some editing issue or something.

FWIW, you can find formation on when a feature was added to WinBatch by searching the "Fixes and Enhancements.txt" file that is part of each WinBatch distribution.
Title: Re: Dialog() Function Issue
Post by: JTaylor on August 13, 2016, 07:10:59 PM
I figured it out.  A side-effect of when I was trying to work around the limit on the number of variables.  Sorry to bother you.

Jim