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: 
pradeeptv
Visitor

how does rolist convert to fuction ?

I have created a rolist . I have added few members in to it using addtail method. then when i checked thelist type.. it was fuction. how does dis happen. Below is my code. Can someone xplain me how to get a list instead of function.


function Product_urls(response as string) As object
'response = catalogs()
json = ParseJSON(response)
product_urls = createobject("roList")
for each element in json.ProductList
elements_urls = element.PreviewList[0]
if type(elements_urls) <> "Invalid"
elements_urls = element.PreviewList[0].URL
product_urls.AddTail(elements_urls)
else
elements_urls = ""
product_urls.AddTail(elements_urls)
end if

END for
return product_urls

end function

0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: how does rolist convert to fuction ?

I responded to your PM, so refer to that for more detail, but basically, the issue is that since BrightScript is not case sensitive, your function name and your variable name are the same. Change one or the other, and that should fix your issue.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
pradeeptv
Visitor

Re: how does rolist convert to fuction ?

It worked thanks!
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.