It is currently September 21st, 2019, 5:36 am

Nesting variables in WebParser's URL option

Help with creating, editing & fixing problems with skins
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Nesting variables in WebParser's URL option

Yincognito » April 6th, 2019, 1:38 am

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... :(
User avatar
Brian
Developer
Posts: 1897
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Nesting variables in WebParser's URL option

Brian » April 8th, 2019, 5:22 am

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
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Nesting variables in WebParser's URL option

Yincognito » April 8th, 2019, 3:45 pm

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: