Ed Leafe wrote:
> On Jun 19, 2007, at 6:43 AM, Uwe Grauer wrote:
> 
>> Traceback (most recent call last):
>>   File "test_dEditBox.py", line 34, in testValue
>>     edt.Value = None
> [snip]
>> TypeError: String or Unicode type required
> 
>       I get it on OS X with wxPython 2.8.4. The error is pretty clear:  
> wxPython TextCtrl objects cannot accept None as a value; they need a  
> string-type value, and the docs say as much.
> 
>       I created some simple tests in raw wxPython, using both the SetValue 
> () and newer ChangeValue() methods of the TextCtrl, in both single-  
> and multi-line modes, and they both throw an error when you try to  
> set a value of None. So IMO the test for dEditBox is correct, and the  
> one for dTextBox is wrong, since it doesn't throw an error for some  
> reason.
> 
>       So what behavior should Dabo text controls have? Should we support  
> None as a value?

We should take this to dabo-dev, but yes, Dabo text controls can have 
values of None, 1.23, Decimal("1.23"), u"test" and "test". Only the 
string value should go back to the wx control, however.

If the value is None, the wx control needs to display the NoneDisplay 
string.


-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to