code: function(names, newval){
  		var name = names.name;
  		var item = this.list[name];
  		switch(typeof item.defval){
  			case "boolean": newval = !!newval;  break;
  			case "number":  newval = +newval;   break;
  			case "string":  newval = ""+newval; break;
  		}
  		if(!item.option || (item.option.indexOf(newval)>=0)){
  			if(!!item.variety){
  				item.variety[names.pid!==void 0 ? names.pid : this.puzzle.pid] = newval;
  			}
  			else{ item.val = newval;}
  		}
  		return item.val;
  	}
docs: --------------------------------------------------------------------------- config.setproper()    設定値の型を正しいものに変換して設定変更する ---------------------------------------------------------------------------