Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.theme.apply.prefs

on prefs (adrTheme, adrPrefsTable=nil) {
	<<Changes
		<<2/13/02; 1:22:36 PM by JES
			<<New optional parameter, adrPrefsTable. If specified, apply the theme's prefs to the specified table, instead of to weblogData.prefs.
		<<12/30/01; 7:29:22 PM by JES
			<<Applies the prefs stored in the Theme table at adrTheme, to the current prefs.
	
	local (adrPrefs = @adrTheme^.prefs);
	local (adrpref);
	for adrpref in adrPrefs {
		local (adr);
		local (prefname = nameOf (adrpref^));
		if adrPrefsTable == nil {
			adr = address (prefname)}
		else {
			if string.lower (prefname) beginsWith "weblogdata.prefs." {
				adr = string.popFileFromAddress (adrPrefsTable) + string.delete (prefname, 1, sizeOf ("weblogData.prefs"));
				table.surePath (adr);
				adr = address (adr)}
			else {
				adr = address (prefname)}};
		adr^ = adrpref^};
	
	return (true)}



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.