Monday, November 08, 2010 at 12:04 AM.
system.verbs.builtins.radio.backup.restorePrefTable
on restorePrefTable (adrsource, adrdest) {
<<Changes
<<11/27/02; 7:24:08 PM by JES
<<Fixed a bug in the recursion which would stop objects from being restored after diving into a table.
<<11/26/02; 10:26:51 PM by JES
<<Created.
on visit (adrsource, adrdest) {
local (adr);
for adr in adrsource {
local (name = nameOf (adr^));
local (dest = @adrdest^.[name]);
if typeOf (adr^) == tableType {
if not defined (dest^) {
new (tableType, dest)};
visit (adr, dest)};
if string.lower (name) contains "password" {
if not defined (dest^) {
dest = binary ("")};
continue};
if typeOf (adr^) == addressType {
local (stringval = adr^);
local (val = radio.backup.getAddress (stringval));
table.assign (dest, val);
continue};
table.assign (dest, adr^)};
return (true)};
visit (adrsource, adrdest)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.