On Aug 24, 2008, at 11:08 AM, Sibylle Koczian wrote:
> I can answer that without running the application: the key zero
> _doesn't_ exist. I had expected that by explicitly setting
> PositionValue
> to zero Keys and Choices would both be set to the values belonging to
> the first list entry (Key = 1 and Choices accordingly). This may be
> rather silly for the present case, but of course there are lookup
> tables
> where the first entry is chosen most often and should be preselected.
> That shouldn't mean it must have a primary key of 0, should it?
If you follow the traceback, the error isn't coming from the setting
of PositionValue, which should work just fine. It is the result of an
update() call, which causes the control to set its Value from its
DataSource/DataField.
File "/usr/lib/python2.5/site-packages/dabo/ui/
dDataControlMixinBase.py",
line 116, in update
self.Value = src.getFieldVal(self.DataField)
File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/
dControlItemMixin.py",
line 370, in _setValue
self.KeyValue = value
Since you have ValueMode = "Key", that means that your control's
KeyValue is bound to the data source in the bizobj. Somehow the value
in DataField of the current record in your bizobj is 0, and so the
update() is trying to set that KeyValue to 0, which obviously doesn't
exist.
How is it that the value for the DataField column is returning zero,
but your biz.getClients() isn't returning zero as one of its PKs?
-- Ed Leafe
_______________________________________________
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]