On Thursday, April 07, 2011 08:20:37 am Henning Hraban Ramm wrote:
> Am 2011-04-07 um 17:06 schrieb John Fabiani:
> > No that's right - I will be using OnHit.  But the problem is not as
> > straight
> > forward as you suggest.  If I set the first dropdown the second,
> > third, and
> > forth must match.  If I set the second the third and forth data
> > choices must
> > match what is in 1 and 2  - and so on.  If I set all of them and
> > then change
> > the first then all the rest must change.  To make matters worse none
> > of the
> > data items come from the same tables.  Each dropdown filters the data
> > available for the next.  And remember I want this to work with Dabo's
> > DataSource and DataFields when not entering data into a new record.
> > 
> > I have considered creating a view and then actually filter the data as
> > required since the records are related but then I could have several
> > thousands
> > of records in memory.  So I have discounted that solution.
> > 
> > I have considered creating a class that would provide a dynamic
> > property that
> > could be set to retrieve the data (choices and keys).  Similar to
> > the ones Ed
> > and Paul have created for other controls.  Not sure how much work
> > this would
> > be?
> > 
> > I have considered creating a single method that all dropdowns call
> > and control
> > the data in the method.  I would be able to read the values (keys)
> > from each
> > of the controls and do what is required to reset the choices for
> > each of the
> > controls.  This might be the way to go.
> > 
> > But I looking for suggestions - from the list.  I don't want to
> > start a lot
> > coding only to later discover I'm traveling along the wrong path.
> 
> The other suggestion of disabling not-yet-set dropdowns is probably
> good.
> 
> You could use events/signals to update all DDs in need.
> 
> Most easy is probably to update DD2 from DD1.onHit, update DD3 from
> DD2.onHit etc.
> (only the next one, not more, except if there’s a high probability
> that the user wants a default value)
> and perhaps reset all following DDs (in case someone changes the
> selection of DD1 after setting DD3).
> 
> In my similar case, I try to keep the selection of following DDs,
> since some selection-cascades are very similar, and it’s annoying to
> choose the same over and over if you’re exploring possibilities.
> 
> But in my case I don’t use Dabo’s bizobjs, but have read all the data
> from an http/JSON call and keep it in memory for the runtime (it’s not
> so much, only lists of sections and subsections for several magazines).
> 
> Sorry for being of no big help.
> 
> Greetlings from Lake Constance!
> Hraban
> ---
> http://www.fiee.net
> https://www.cacert.org (I'm an assurer)

Actually anything someone says is helpful even if it's wrong (not that you are 
wrong) as long as others correct it.  Ask Ed how many times he's corrected me 
on this list.  Of course maybe Ed doesn't agree with my statement.

I doubt this problem is very unique (did it all the time for VFP) but it is 
different for wxPython (therefore Dabo) IMO.  With VFP the dropdown (comboBox) 
was more dynamic.  Anyway, I'm playing as I type with a solution of course 
it's not working.

Johnf
_______________________________________________
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