Changeset 4227

Show
Ignore:
Timestamp:
07/04/08 08:35:01 (5 months ago)
Author:
ed
Message:

Added code to convert numerics passed as strings to FontSize? into a numeric type.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/ui/uiwx/dFont.py

    r4186 r4227  
    105105 
    106106    def _setSize(self, val): 
     107        try: 
     108            val = int(val) 
     109        except ValueError: 
     110            # Could be fractional. Try casting to float. If that fails, 
     111            # let the ValueError be raised. 
     112            val = float(val) 
    107113        if self._useMacFontScaling(): 
    108114            self._macNonScaledSize = val