neowinston
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2017
08:48 AM
How do I pass a string to sub init() of XML file?
I need to pass a string to sub init() or any other function or field of a LabelList XML file. How do I do that? Thanks for your help!
2 REPLIES 2
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2017
09:02 AM
Re: How do I pass a string to sub init() of XML file?
Init is executed when the component is compiled, so I wouldn't think you would be able to 'pass' a value into it in Init from outside the component. To set a variable within the init function you would just do that -- m.temp="Hello"
You would be able to pass values into compiled components by making the value global so the component can pull from the global namespace, or by setting up a field in the xml to transfer values in and out of the component.
You would be able to pass values into compiled components by making the value global so the component can pull from the global namespace, or by setting up a field in the xml to transfer values in and out of the component.
<interface>
<field id="mydata" type="string" />
</interface>
neowinston
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2017
10:24 AM
Re: How do I pass a string to sub init() of XML file?
Thank you!