On Tuesday 19 August 2008 11:05:17 am Paul McNett wrote:
> johnf wrote:
> > On Tuesday 19 August 2008 10:43:21 am Paul McNett wrote:
> >> Ed Leafe wrote:
> >>> On Aug 19, 2008, at 1:30 PM, johnf wrote:
> >>>> Doesn't it make sense that a list type control should be able to use a
> >>>> dataset? Often the control is associated with data retrieved from a
> >>>> table.
> >>>> But the data retrieved must be massaged. Just a thought I had.
> >>>
> >>> You'd still have to determine what column in the dataset was the key;
> >>> what column(s) should be displayed. Where would the 'savings' be?
> >>
> >> The boilerplate code for setting Keys and Choices that appdev code must
> >> write, probably by requerying and iterating a bizobj, would now be part
> >> of the framework, so appdev code need only set a handful of properties.
> >>
> >> Paul
> >
> > Being my own devils advocate what happens when a record gets deleted from
> > the look up list and the underlying data is no longer in the list. You
> > get ("String must be present in the choices.")
> > I.e.
> > I have a save customer with zip "95776"
> > I delete the record for "95776"
> > When the record is displayed I'll get ("String must be present in the
> > choices.")
>
> This touches on discussions yesterday on what to do when setting the
> Value of a list to a non-existent key. It is the same issue, only your
> example is using StringValue while what we were discussing was KeyValue.
>
> As it is right now (for KeyValue, but we should make it consistent among
> StringValue, PositionValue, and KeyValue) a ValueError exception will be
> raised if you try to set lst.Value to a key that doesn't exist in the list.
>
> Paul
My point was that what the developer currently has is full control of the keys
and choices. But with a dataset he would lose control - right? I guess it
would be possible to add a special record. Or can the developer just ignore
the issue. As it stands now the error will not stop the app.
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]