wpcs
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
09:38 AM
roku arrays
I'm new at roku development, and have some programming experience.
I'm trying to capture 3 previous sku# into an array. I've been trying to get it to work using
prevItemList = CreateObject("roArray",3,true)
but not having much luck getting the list to print.
Can anyone point me to an example, or give me some ideas on this.
thanks.
scott
I'm trying to capture 3 previous sku# into an array. I've been trying to get it to work using
prevItemList = CreateObject("roArray",3,true)
but not having much luck getting the list to print.
Can anyone point me to an example, or give me some ideas on this.
thanks.
scott
2 REPLIES 2

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
11:29 AM
Re: roku arrays
You need to use Push to populate your array
If you do it this way
myAyrray.Push( myData1 )
myArray.Push (myData2 )
...
For each data in myArray
Print data
End for
If you do it this way
myAyrray.Push( myData1 )
myArray.Push (myData2 )
...
For each data in myArray
Print data
End for
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
03:09 PM
Re: roku arrays
No need to bother with createObject, you can directly construct array with [ ]; also add/remove elements at the end with .push/.pop.
BrightScript Debugger> SKUs = [123456, "AK-47", "RPG-7"]
BrightScript Debugger> ? SKUs
123456
AK-47
RPG-7