New developer here... This should be easy for someone with experience
I'm creating a new field in an interface tag and trying to set the value before I run the object. I print the field inside the object and it is always empty. It is as if the field is READONLY from outside the object. Here is some test code from the final ScreenGraph tutorial
Near the top of TutorialPanelSetScene.xml I have inserted this line of code:
sub init()
print "Init ()"
m.top.backgroundURI = "pkg:/images/rsgde_bg_hd.jpg"
m.readContentTask = createObject("roSGNode", "ContentReader")
m.readContentTask.observeField("content", "setcategories")
m.readContentTask.contenturi = "http://www.sdktestinglab.com/Tutorial/content/categoriescontent.xml"
m.readContentTask.test = "TEST" m.readContentTask.control = "RUN"
end sub
In ContentReader.xml I have added this code:
<interface>
<field id = "contenturi" type = "uri" />
<field id = "test" type = "string" /> <field id = "content" type = "node" />
</interface>
and this code:
sub getcontent()
print "in ContentReader getcontent()"
print "m.top.contenturi is " m.top.contenturi
print "m.top.test is " m.top.test ...
In my Telnet session this is what I get:
in ContentReader getcontent() m.top.contenturi is
http://www.sdktestinglab.com/Tutorial/c ... dsgrid.xml m.top.test isWhat am I missing here? I set it up just like the "contenturi" and the value assigned to it is passed whereas the value assigned to "test" is not.
Thank you and please also include where I can find the documentation that explains your answer.
Curtis