Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
btpoole
Channel Surfer

Completely Confused

Ok, so I know you can't call urltransfer directly from a scene, it has to go thru a task.  I also understand an existing brs file can be pulled into a scene to utilize existing code. So if I have a brs file that creates a urltransfer, then parses the return into an array I would first have to create a task, put the urltransfer in the task and run the task. The parse would have to be done in the Task with the return of transfer, putting the parse result in a content child. Can the return of parse not be placed in an array (m.array) like I was doing in the original brs and be made available to setting content of list or grids? I am most likely missing a big point here but it seems pulling in existing brs to utilize parts is totally useless if the brs is a urltransfer. I have attempted to pull in the brs and run the original urltransfer and parse the return but get an error on set(url).  Most likely I am going to be told that the urltransfer and parse will be done in a task with result going into a content node and child. If this is the case can some body show me an example of how to create additional attributes for the node. For example if I have 
<component name = "InitialContentReader" extends = "Task" >
  <interface>
    <field id = "content" type = "node" />
    </interface>
  <script type = "text/brightscript" >

The child attributes for a markupgrid are title, hdgridposterurl, and sdgridposterurl.  I would like to add a child called additionalinfo which would be a string. Would I simply add this to the interface like

<interface>
  <field id = "content" type = "node" />
    <field id= "additionalinfo" type = "string" />
    </interface>
0 Kudos
2 REPLIES 2
philotas
Roku Guru

Re: Completely Confused

I am not sure I understand the question.

But you can of course add as many interface fields to your Task as you want an then access them in your callback function which is triggered when your Task finished loading. you could also wrap all info in one object/associativearray
0 Kudos
btpoole
Channel Surfer

Re: Completely Confused

Thanks for responding, I may have been rambling out of frustration and confusion. If I can add additional attributes to the node in the interface then this may solve my problem.  
Thanks again
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.