Użytkownik John Fabiani napisał:
> I see an immediate issue with the bizobj use.  You assume that the bizobj is
> only used for the choices and keys.  I often need to use the same bizobj in
> different ways and you can't use the same table twice in Dabo.  Although,
>    

Actually, you can use the same data source unlimited number of times
with some limitations considering UI layer,
e.g. only the first instance of the particular data source can be accessed
with form getBizobj() method.
These limitations doesn't concern situation where you refer
your bizobjs as object form attributes.

> others have reported otherwise - I have not been successful in just renaming a
> bizobj.   So I have two methods
> 1. use a temp cursor to access the data directly  - I use this often!
> 2. created a view that matched my requirements.
>
> "updateChoices" method does it the way I do it (accept you require a bizobj).
> But you are also filtering.  What happens when the bizobj data is very large?
> Do you really want to retrieve all the data?
>
> "ensureSourceValInChoices" method - I like it and with your permission will
> use some of it.  However, you are appending the invalid value even if the
> value is not valid.  How does that get around the issue I have where the
> stored value is no longer valid?
>
> Not all dropdown routines will depend on "OnHit".   There is a ChangedValue.
> You might want to capture more events.\
>    

I have working mixin class I use for such tasks with most item controls like
dropdown list, list control, etc.
It's universal and can rely on bizobj, dataset or callable as his data 
source.
If control is bound to the bizobj, all changes in Choices are handled 
automatically.
I would like to share my code with you but I'm still lack of time to 
document it well
and write few samples, what is even more important.
Maybe in next week I will got some free time and will try to put it on 
wiki page.

Regards
Jacek Kałucki
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4dadc6ef.4050...@rz.onet.pl

Reply via email to