Changeset 3226

Show
Ignore:
Timestamp:
07/05/07 16:30:13 (2 years ago)
Author:
ed
Message:

Added support for dictionaries as a preference setting type. There was no reason this wasn't done before, except that it was an oversight.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dPref.py

    r3199 r3226  
    6262        self._noneType = type(None) 
    6363        self._typeDict = {int: "int", float: "float", long: "long", str: "str", unicode: "unicode", 
    64                 bool: "bool", list: "list", tuple: "tuple", datetime.date: "date",  
     64                bool: "bool", list: "list", tuple: "tuple", datetime.date: "date", dict: "dict", 
    6565                datetime.datetime: "datetime", self._noneType: "none"} 
    6666        if crs is None: 
     
    178178        elif typ == "bool": 
    179179            ret = (val == "True") 
    180         elif typ in ("list", "tuple"): 
     180        elif typ in ("list", "tuple", "dict"): 
    181181            ret = eval(val) 
    182182        elif typ == "date": 
     
    470470    print a.getPrefs(True) 
    471471 
    472  
    473472    zz=a.getSubPrefKeys() 
    474473    print "SUB PREFS", zz 
     
    489488    a.deleteAllPrefs() 
    490489    print a.getPrefs(True) 
    491