On Tuesday, April 19, 2011 08:31:57 am Rasmus Schøler Sørensen wrote: > I follow you very well regarding your considerations about list-controls, > especially when they both have to be updated dynamically and (optionally) > associated with a DataSource+Field. I have tried to create a mixin class > for UI list widgets with completely generic logic for this kind of stuff > keys+choices logic. I just set the datafield and -source (or bizobj) from > which it should get the keys+choices, and then most is taken care of in > the mixin class. It can also filter the values according to values from > other fields in the keys+choices source, and some other automatic logic. > (source: > https://bitbucket.org/rasmusscholer/oligomanager/src/91e226ec9cf5/oligomana > ger/ui/ListMixin.py )
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, 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.\ 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]
