Help with saveing

I am trying to make a widget that has 3 or more edit boxxes that I want to save the info from.  I am useing object.persiststorage but I want it to store it as an array.  Say "album(artest(song))" but I don't know if or how to acomplish this task.  If anyone could help please do.  And then how could I recall them by using list boxxes.  Thanks alot for your help.

3,703 views 2 replies
Reply #1 Top
*bump*
Reply #2 Top
Saving arrays not so easy, Persist storage basically will only store strings. Have a look at the VBScript Join() command. You can join an array into a single string with the elements divided by a delimeter like "|". So a(0) = "hi" and a(1) = "Skarn": a_str = Join(a,"|") would give a_str = "hi|Skarn". Then you can save that to persist storage. To get the string back to an array, use the Split() command, a = Split(a_str,"|"). Sorry there are no carriage returns. Blame Stardock Central.