Re: Dialog library and vertical block expansion
Posted: Tue Aug 27, 2024 9:09 am
Hello,
We're digressing a bit from the main purpose of this thread, namely why in some cases using the multibox 'gadget' seems to disrupt the intended expansion behavior.
Again, at no point, I'm claiming that my approach is the best way to proceed.
But let's consider the following enumeration:
and now:
With this line, an error (unspecified) will be signalled when the code is executed.
Whereas with this line, an error will be signalled at compile time with a clear message: “Variables must be explicitly declared”.
Here's "MY appreciated" advantage: I avoid a possible source of error before code execution and, if there is one of this type, PB will return a precise message: “Variables must be explicitly declared”. No need to spend time to search through the parsed XML string...
Admittedly, this requires a little more typing on my part, but this inconvenience is counterbalanced by the time it would take me to find potential errors.
This is my approach, and far be it from me to try to convince anyone.
We're digressing a bit from the main purpose of this thread, namely why in some cases using the multibox 'gadget' seems to disrupt the intended expansion behavior.
Again, at no point, I'm claiming that my approach is the best way to proceed.
But let's consider the following enumeration:
Code: Select all
EnableExplicit
Enumeration
#StrinGadget1 ; Note here only one 'g' in the name
EndEnumerationCode: Select all
"<string id='#StringGadget1' name='StringGadget1'/> ; Note two 'g' here"Code: Select all
"<string id='"+Str(#StringGadget1)+"' name='StringGadget1'/>"Here's "MY appreciated" advantage: I avoid a possible source of error before code execution and, if there is one of this type, PB will return a precise message: “Variables must be explicitly declared”. No need to spend time to search through the parsed XML string...
Admittedly, this requires a little more typing on my part, but this inconvenience is counterbalanced by the time it would take me to find potential errors.
This is my approach, and far be it from me to try to convince anyone.