On Dec 30, 2012, at 9:32 AM, Carey Gagnon <[email protected]> wrote:
> Sorry for the lack of info. I ried your suggestion, and it still throws the
> ValueError;
The problem is that something is causing the dropdown to try to set its
KeyValue to the empty string. According to the traceback:
> File "C:\src\dabo\ui\dDataControlMixinBase.py", line 138, in __dataUpdate
> self.Value = src.getFieldVal(self.DataField)
> File "C:\src\dabo\ui\uiwx\dControlItemMixin.py", line 394, in _setValue
> self.KeyValue = value
> File "C:\src\dabo\ui\uiwx\dControlItemMixin.py", line 254, in
> _setKeyValue "DataField: '%(dataField)s') to these invalid selections:
> %(invalidSelections)s") % locals())
> ValueError: Trying to set dDropdownList1.Value (DataSource: 'dbo.Cities',
> DataField: 'ProvinceState') to these invalid selections: [u'']
...since _setValue() is being called, it got a value of "" from the
call to the bizobj's getFieldVal() call. That would mean that you have a blank
record in your dataset (or at least one with a blank ProvinceState value). Are
you by chance automatically calling new() at some point in this process?
> Here's the full traceback, which by the way seems to get thrown twice when
> calling the form:
There seems to be an event that is causing the form to want to update
itself, which is the source of the second error:
> File "C:\src\dabo\ui\uiwx\__init__.py", line 318, in ca_func
> _func(*args, **kwargs)
> File "C:\src\dabo\ui\uiwx\dForm.py", line 133, in update
> super(BaseForm, self).update()
> File "C:\src\dabo\ui\uiwx\dPemMixin.py", line 1372, in update
> self.raiseEvent(dEvents.Update)
It's the same error, because the underlying condition (blank value
returned from getFieldVal()) hasn't changed.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]