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: 
dynamitemedia
Binge Watcher

Re: how to do that Vimeo style "next >>" link?

I tried that and got this error

122: End Function
/tmp/plugin/MNAAAAvBlem8/pkg:/source/appPosterScreen.brs(106): runtime error e7:
Array operation attempted on variable not DIM'd.

106: if showList[msg.GetIndex()].action = "next" then

Backtrace:
Function showposterscreen(screen As Object, category As Object) As Integer
Function displaycategoryposterscreen(category As Object) As Untyped
Function showhomescreen(screen As Untyped) As Integer
Function main() As Void


I have to say that is a new error i have never seen
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: how to do that Vimeo style "next >>" link?

Sorry.. should be:
showList = m.Screen.GetContentList()
if showList[msg.GetIndex()].action = "next" then
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
dynamitemedia
Binge Watcher

Re: how to do that Vimeo style "next >>" link?

Thanks endless after going crazy over where a "end if" goes i finally got to it but i had to change it to:

showList = screen.GetContentList()
if showList[msg.GetIndex()].action = "next" then


But Not sure this is even feasible the more i look at the logic of it, at least with the video player example
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
jbrave
Channel Surfer

Re: how to do that Vimeo style "next >>" link?

Most of the logic of my app does not use that encapsulation stuff that theEndless does, it mostly relies on integer variables and roarrays to determine where it is at in the program. For implementing this aspect, what I did was to add to each poster object, whether dynamically created from xml or created manually, and do this:

posterobj=CreateObject("roassociativearray")
posterobj.Title=object.GetnamedElements("blah").GetText()
posterobj....
posterobj.action="Previous"
return {poster:posterobj}

then in my main loop when figuring out which action to perform in my if then:

itemindex=msg.getindex()
if poster[itemindex].action="previous"
then
blah blah
end if

hope that helps
don't know if that helps
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
jbrave
Channel Surfer

Re: how to do that Vimeo style "next >>" link?

ps, really want to understand how to build my apps using object encapsulation, will ask some questions when I have time.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
dynamitemedia
Binge Watcher

Re: how to do that Vimeo style "next >>" link?

I don't think i'm following you Jbrave 😞

can you do the " << >> " pagination style using the xml feed?
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
jbrave
Channel Surfer

Re: how to do that Vimeo style "next >>" link?

When I'm parsing the xml feed, of which I only grab 20 items at a time, I add one more value that is not in the feed to each posteritem, which is

action="play"

I have a calculation I do to see if any paging has been done. If it has not I add an "empty" item that pretty much just contains an image and action="next" (in TheEndless way of doing it, he would probably have {action:"next"}
If there has been any paging, I have an index variable that controls the offset from the top of the xmllist, if it is greater than 0 then I also add an action="previous" on the beginning of the posterlist.

in my if/then statements I check all my indexes and also the action - action="play" means it is a media item, action="none" means there was a server error and there is a bad item, action="previous" or "next" means add 20 or subtract 20 from the offset and get the next batch of poster items from the server.

- Hope that helps.

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
dynamitemedia
Binge Watcher

Re: how to do that Vimeo style "next >>" link?

"TheEndless" wrote:
Sorry.. should be:
showList = m.Screen.GetContentList()
if showList[msg.GetIndex()].action = "next" then


ok so what is this error anyways i just found i am getting it again
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: how to do that Vimeo style "next >>" link?

Which error is that? The "variable not DIM'd" error? That means you're attempting to use a variable that was never declared previously.
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
dynamitemedia
Binge Watcher

Re: how to do that Vimeo style "next >>" link?

ok thanks i never saw it before...
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
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.