Page 2 of 2

Re: Nesting variables in WebParser's URL option

Posted: April 6th, 2019, 1:38 am
by Yincognito
Just to be helpful a little...

Library/MeasureWebParser.cpp, line 336:
while ((start = url.find(L"[&", start)) != std::wstring::npos)

Basically, it doesn't check for [# in order to correctly identify the variable to pass to the parser.ReplaceVariables(var); line below. I'm not sure if the std::wstring var = L"["; is suited for variables either, although by the looks of it, it's perfect for measures or section variables.

There might be other things that need some tweaking there, but unfortunately, I'm not an expert in C++ to point them out... :(

Re: Nesting variables in WebParser's URL option

Posted: April 8th, 2019, 5:22 am
by Brian
Yeah, for the Webparser plugin (now a measure), we had to tweak the URL option in order to get DynamicVariables=1 to work. We settled on the "[&" syntax to reference another measure's value since the URL option previously used the section variables syntax as reference to another parent webparser measure.

Not long after, we agreed to allow for nested syntax in which we would accept the "[&" as a section variable in order to nest variables....and when we finally got it done, we forgot to edit the Webparser code to get it working. This will be fixed for the first 4.4 beta.

-Brian

PS - Thanks for the links to the code, however, as Captain Ramius would put it: "Your conclusions were all wrong ..." :D

Re: Nesting variables in WebParser's URL option

Posted: April 8th, 2019, 3:45 pm
by Yincognito
Brian wrote: April 8th, 2019, 5:22 am...and when we finally got it done, we forgot to edit the Webparser code to get it working. This will be fixed for the first 4.4 beta.

-Brian

PS - Thanks for the links to the code, however, as Captain Ramius would put it: "Your conclusions were all wrong ..." :D
No problem - I was just trying to make it easier for you, with my limited C++ knowledge. :D Glad to know it will be fixed in a future beta though - hopefully it won't be a difficult task. :thumbup: