To answer the question of why it was changed. I was changed because attributes() is now a list not a map like before when it was called attributeMap(). You no longer have to do the index look up and just just do [index] or [name].
- Nathan On Tue, Feb 19, 2013 at 9:06 PM, Sandro Santilli <[email protected]> wrote: > On Tue, Feb 19, 2013 at 08:54:55PM +1000, Nathan Woodrow wrote: > > Why not just hide it using Python method overriding: > > > > QgsVectorLayer.attributeMap = QgsVectorLayer.attributes > > > > Then you can just call attributesMap()[] and it will call > > QgsVectorLayer.attributes for you. > > I guess you meant QgsFeature. > Didn't work, anyway: > > line 102, in doRemEdgeModFace > edge_id = feature.attributeMap()[edge_id_fno].toInt()[0] > TypeError: QgsFeature.attributes(): first argument of unbound method must > have type 'QgsFeature' > > is attributes() a free function rather than a method ? > > --strk; >
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
