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

Looping Through Registry Section?

I've been combing the docs and here but cannot find an answer to this. I've created a section in the registry called "configs" and each config I write as "config1",configdata. I'm trying to figure out how I can loop through ALL entries in the "configs" section and identify "config1", "config2", etc. Right now I have to know the name and poll it specifically, which means I'll have to create another reg entry for an index and hate to do that on the precious 16K that is allotted for channels.

I tried the following quick test to no avail:


sec = CreateObject("roRegistrySection", "configs")
print "Reg: " + sec
for each z in sec
print sec.read(z)
next
0 Kudos
2 REPLIES 2
belltown
Roku Guru

Re: Looping Through Registry Section?

I haven't tested this out, but something like this should work:


for each key in sec.GetKeyList ()
print "Key=" + key + ". Value=" + sec.Read (key)
end for
0 Kudos
ibscas
Visitor

Re: Looping Through Registry Section?

You are awesome, that was just what I needed. Thank you so much!
0 Kudos