From: Michele C. <mca...@in...> - 2009-10-07 17:28:19
|
Hi, following the same approach of PythonCard's components, I tried to add a multiselection list (as opposed to the single selection one avaialable 'List') by simply copy-paste-modify the code for List in list.py under components. Aside from the type field, which contains LB_MULTIPLE instead of LB_SINGLE, a couple of changes in the getter and setter and the class name not much was needed. Problems arise though when I open the layout editor. First of all, the MultiSelList doesn't appear in the components list. Furthermore, when I click on List to instantiate a new layout component, it actually instantiate a MultiSelList instead of the usual List. I suppose there is something going on with the registration of the class with the engine, as the console spits an error out because the class key lookup for MultiSelList in the component class dictionary failed (in registry.py). I also tried adding the new component in a another folder appcomponents as that seems the way suggested. No luck. Do you have any hint on what it takes to add this new class/component or alternatively extend the current 'List' to be either ways (multi selection AND single selection (default so that it does not clash with the tools already developed)? My Best Regards, Thanks for this amazingly simple GUI framework. Michele |