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: 
squirreltown
Roku Guru

Add to Register

I'm making a User Favorites sub for a slideshow. It should be persistant. There is no append to the registry though, each value replaces the former. I have something like this:
If sec.Exists = false
write x32 (32 is ID of image x is replaced by PHP in the DB creating the RSS feed)
if sec Exists = true
write ,x32 (comma also replaced by PHP later)

This all working fine, but what is the strategy for multiple values that survive across restarts? I see you can append with writefile to tmp/ . Is it startup-readfile from reg, write to tmp- append to tmp- write entire file to reg on close?

my file would look like this
x32,x15,x5,x205,x7 etc.

thanks
Kinetics Screensavers
0 Kudos
2 REPLIES 2
RokuMarkn
Visitor

Re: Add to Register

It's not completely clear to me what you're asking. It would be clearer if you posted real code rather than pseudocode (I don't really understand what "write x32" means.) I'm guessing that you want a way to append to a registry entry. To do that you'd read the entry into a string, append to the string, then write the entry back to the registry.

--Mark
0 Kudos
squirreltown
Roku Guru

Re: Add to Register

Thank You Mark - I think you answered my question, you guessed correctly - I have a key value that is an ID number(s), I need to append the ID of each slide each time a user selects "Save To User Gallery". I am creating a string that gets appended to a URL as a GET request. I'll give it a try, what you describe is much simpler than what I imagined i needed to do.
Kinetics Screensavers
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.