jeswin
1
Hi,
In scene graph Task Component
can we return string value instead of content node?
<interface>
<field id = "ProcessType" type = "string" />
<field id = "content" type = "node" />
<field id="isValid" type="boolean" />
</interface>
Can i return ProcessType value to Scene?
EnTerr
2
Absolutely!
You can return any type that RSG supports - string, , { }… any JSON sausage you can think of, plus a few more.
jeswin
3
Thank you for your reply.
Can you just give an example how you will get the string value from Task component to Scene component.
I accept we can set the value for interface, but how will you return string from a function in Task Component.
For example:
m.taskContent = createObject("roSGNode","contentReader")
m.taskContent.FunctionName="getProcessType"
m.taskContent.Control="RUN"
processType =""
processType = m.taskContent.ProcessType
is it possible like this? or in any other way?
Use this code in your Scene component:
m.taskContent.ObserveField("ProcessType", "onProcessType")
sub onProcessType()
print "ProcessType: "; m.taskContent.ProcessType
end sub
jeswin
5
Yea i am doing like this only, it is working fine mate.
Thanks for your reply