Can somebody post an example of how to create a custom field. I have a task that runs, gets data from server, parses the data. I would like to assign part of the parse to a custom field name but have been unsuccessful in creating the custom field. Just putting it in the interface doesn't seem to do it. I have created an extends of the Task and added the field but I am not sure how to tell the Task an extend exists. I have something like the following:
<component name = "programContentReader" extends = "Task" > <interface> <field id = "content" type = "node" /> <field id = "myfield" type = "string" /> </interface> <script type = "text/brightscript" > <![CDATA[ sub init() m.top.functionName = "readcontent" end sub
Function readcontent() as object content = CreateObject("roSGNode", "ContentNode") Stuff going on here to parse
dataItem = content.CreateChild("ContentNode") dataitem.myfield= whatever is in parse m.topcontent=content end function
None taken what so ever. I was using the SimpleMarkupList example as sort of a guide, but was making it harder than it needed to be. I think I was mixing in group as in the example when I didn't need to. Thanks for pointing me in the right direction.