jeswin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017
04:16 AM
Is it possible to return string from Task?
Hi,
In scene graph Task Component
can we return string value instead of content node?
Can i return ProcessType value to Scene?
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?
4 REPLIES 4
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017
10:25 AM
Re: Is it possible to return string from Task?
Absolutely!
You can return any type that RSG supports - string, [ ], { }... any JSON sausage you can think of, plus a few more.
You can return any type that RSG supports - string, [ ], { }... any JSON sausage you can think of, plus a few more.
jeswin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2017
02:26 AM
Re: Is it possible to return string from Task?
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:
is it possible like this? or in any other way?
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?
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2017
10:33 AM
Re: Is it possible to return string from Task?
Use this code in your Scene component:
m.taskContent.ObserveField("ProcessType", "onProcessType")
sub onProcessType()
print "ProcessType: "; m.taskContent.ProcessType
end sub
jeswin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2017
09:47 PM
Re: Is it possible to return string from Task?
Yea i am doing like this only, it is working fine mate.
Thanks for your reply
Thanks for your reply