From: Alex T. <al...@tw...> - 2004-08-25 16:59:07
|
At 09:44 25/08/2004 -0700, Kevin Altis wrote: >Well the old way was to use a selection or selected attribute and >sometimes one of those did dual-duty by checking the input arg on 'set' >which allowed you to pass in a string or integer, but of course the 'get' >version could only return one type. To make matters worse, not all the >components used the attribute names in the same way. This was just one of >those issues that existed from some of the earliest versions of the >prototype and I kept putting off making all the components consistent. I >would have to go back and look at every component and compare them to the >0.8 components to document all the variations and frankly I would rather >fix bugs or add new functionality. >I think the short story is that if you were using a method or attribute >related to selection or selected then you should probably just be using >selection or stringSelection now and you have to look at your source and >resource files to update them. I don't think there's any need to document each of the changes - but the relevant paragraph in the migration guide needs to be a bit simpler for those who (like me) didn't necessarily fully understand what they had before (i.e. we had copied an example or another bit of code). The migration guide mentioned the 'selected' and 'selection' attributes needing to be changed - so it maybe wasn't obvious that GetSelectionIndex( ) and GetSelection() would also need to be changed. How about .... >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. .... add .... The correct way to get the result of a selection now is to use either the attribute 'selection' to retrieve the integer index, or 'stringSelection' for the text value; if you previously used functions such as GetSelection() or GetSelectionIndex() these need to be changed to use the attributes directly. >What I think I will do is turn the migration_guide.txt file into HTML >using the reStructuredText format and stick that on the main documentation >page so fewer people miss it. That will definitely be a good thing, but in this case both Adrian and I had read the migration guide and didn't appreciate the import of what it was telling us. -- Alex. |