home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Products
IR Server Suite (IRSS)
[PATCH]: Translator doesn't load variables for a macro correctly
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Clinton" data-source="post: 541665" data-attributes="member: 83037"><p>There is a bug in how Translator saves and load variables to and from a file when executing a macro. Although the 'Save Variables' macro command successfully writes variables to a file, the 'Load Variables' command has a bug that means it will not load the variables back.</p><p></p><p>The bug is in IRSSUtils module VariableList.cs in the Load method:</p><p></p><p></p><p>[CODE] XmlNodeList variableNodes = doc.DocumentElement.SelectNodes([COLOR="Red"]"VariableList"[/COLOR]);</p><p></p><p> foreach (XmlNode node in variableNodes)</p><p> SetVariable(node.Name, [COLOR="red"]node.Value[/COLOR]);[/CODE]</p><p></p><p>Alternative code that works is:</p><p></p><p>[CODE] XmlNodeList variableNodes = doc.SelectNodes([COLOR="Green"]"/variables/*"[/COLOR]);</p><p></p><p> foreach (XmlNode node in variableNodes)</p><p> SetVariable(node.Name, [COLOR="green"]node.InnerText[/COLOR]);[/CODE]</p><p></p><p>Chemelli, would you please add this in the next build?</p></blockquote><p></p>
[QUOTE="Clinton, post: 541665, member: 83037"] There is a bug in how Translator saves and load variables to and from a file when executing a macro. Although the 'Save Variables' macro command successfully writes variables to a file, the 'Load Variables' command has a bug that means it will not load the variables back. The bug is in IRSSUtils module VariableList.cs in the Load method: [CODE] XmlNodeList variableNodes = doc.DocumentElement.SelectNodes([COLOR="Red"]"VariableList"[/COLOR]); foreach (XmlNode node in variableNodes) SetVariable(node.Name, [COLOR="red"]node.Value[/COLOR]);[/CODE] Alternative code that works is: [CODE] XmlNodeList variableNodes = doc.SelectNodes([COLOR="Green"]"/variables/*"[/COLOR]); foreach (XmlNode node in variableNodes) SetVariable(node.Name, [COLOR="green"]node.InnerText[/COLOR]);[/CODE] Chemelli, would you please add this in the next build? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
IR Server Suite (IRSS)
[PATCH]: Translator doesn't load variables for a macro correctly
Contact us
RSS
Top
Bottom