On Aug 25, 2004, at 3:57 AM, Alex Tweedly wrote:
> At 08:37 25/08/2004 +0100, Adrian Smith wrote:
>> However the second problem I have yet to resolve.
>> I use .list.getSelectionIndex() which was fine in 0.7.3.1 but now the
>> program falls over at that point saying
>> AttributeError: 'List' object has no attribute 'getSelectionIndex'
>> I had a look at the components doc but it still says use
>> What is the new variation of this command?
> I don't have a 0.7.3 on here any more to check completely, but I'm 99%
> sure if should be
That is the wxPython method name and that is what getSelectionIndex
used to wrap. PythonCard now uses the attributes selection for the
integer index and stringSelection for the string selection. These are
defined in the ContainerMixin class in components/list.py.
From the migration_guide.txt:
selection and stringSelection Attributes
The Choice, ComboBox, List, RadioGroup components were updated to use
'selection' and 'stringSelection' attributes instead of
mixed-capability 'selected' and 'selection' attributes. If you were
using these attributes previously, you will have to update both your
source and resource files.
In addition, though you can use selection for manipulating a live
component, the spec for the components above only defines
stringSelection, so that is all you can use in the resourceEditor, not
the integer index. I thought it would be too confusing to users to
support both and have to provide some sort of conflict negotiation when
the integer and string index didn't match.