Mike Mabey wrote:
> On Wed, Aug 20, 2008 at 3:49 PM, Paul McNett <[EMAIL PROTECTED]> wrote:
>>
>>  From what you describe, you want settings like the following:
>>
>> class MyRadioList(...)
>>   def initProperties(self):
>>     self.Choices = ["1", "2", "3", "4"]
>>     self.Keys = {"1": 0, "2":1, "3":2, "4":3}
>>     self.ValueMode = "Key"
>>
>> Does that look like what you've done?
>>
>> Paul
>>
> 
> Thanks for replying Paul.  Actually, I was lazy and just added the choices
> in the Object Info window of the ClassDesigner. I just tried starting over
> with a new dRadioList and inserting your code, and now I'm getting this:
> 
> Traceback (most recent call last):
>   File "C:\Python25\lib\site-packages\wx-2.8-msw-ansi\wx\_misc.py", line
> 1341, in Notify
>     self.notify()
>   File "C:\Python25\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line
> 13932,in Notify
>     self.result = self.callable(*self.args, **self.kwargs)
>   File "C:\src\dabo\ui\uiwx\dForm.py", line 147, in __update
>     super(BaseForm, self).update()
>   File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 1218, in update
>     self.raiseEvent(dEvents.Update)
>   File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 925, in raiseEvent
>     super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
> **kwargs)
>   File "C:\src\dabo\lib\eventMixin.py", line 92, in raiseEvent
>     bindingFunction(event)
>   File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 1195, in __onUpdate
>     self.update()
>   File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 1218, in update
>     self.raiseEvent(dEvents.Update)
>   File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 925, in raiseEvent
>     super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
> **kwargs)
>   File "C:\src\dabo\lib\eventMixin.py", line 92, in raiseEvent
>     bindingFunction(event)
>   File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 1195, in __onUpdate
>     self.update()
>   File "C:\src\dabo\ui\dDataControlMixinBase.py", line 118, in update
>     self.Value = self.getBlankValue()
>   File "C:\src\dabo\ui\uiwx\dControlItemMixin.py", line 368, in _setValue
>     self.KeyValue = value
>   File "C:\src\dabo\ui\uiwx\dControlItemMixin.py", line 223, in _setKeyValue
>     raise ValueError, _("Trying to set %s.Value to these invalid selections:
> %s") % (self.Name, invalidSelections)
> ValueError: Trying to set dRadioList_63730834.Value to these invalid
> selections: [None]
> 
> For a reference, my initProperties() looks like this:
> 
> def initProperties(self):
>     self.Choices = ["1", "2", "3", "4"]
>     self.Keys = {"1": 0, "2":1, "3":2, "4":3}
>     self.ValueMode = "Key"

Please update to the latest SVN (I just fixed this) and let me know. Thanks!

Paul


_______________________________________________
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/[EMAIL PROTECTED]

Reply via email to