Hi Many thanks Martin!
Regards Tim On 8/6/10, Martin Dobias <[email protected]> wrote: > Hi Tim > > On Fri, Aug 6, 2010 at 11:09 AM, Tim Sutton <[email protected]> wrote: >> Hi Martin & other pythonistas >> >> I'm trying to use >> >> void QgsRasterLayer::computeMinimumMaximumFromLastExtent ( >> int >> theBand, double * theMinMax ) >> >> Via python. However I can't seem to figure out how to pass the >> arguments. I tried doing: >> >> void QgsRasterLayer::computeMinimumMaximumFromLastExtent ( >> int >> theBand, double * theMinMax ) >> >> >> Looking at the generated sip file: >> >> qgis/build/python/core/sipcoreQgsRasterLayer.cpp >> >> If doesnt seem to internally use a double* for the a1 var. (line 2167 >> below). Is this a bug with the sip file defs, or am I missing how to >> use the method? > > Indeed the wrapper has not been generated correctly because it has > quite specific semantics (sip expected that only one value is going to > be returned). As a workaround, I've added another override in r14017 > which can be handled automatically by sip: > >>>> layer.computeMinimumMaximumFromLastExtent(1) > (0.0, 255.0) > > Cheers > Martin > -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) ============================================== Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Visit http://linfiniti.com to find out about: * QGIS programming and support services * Mapserver and PostGIS based hosting plans * FOSS Consulting Services Skype: timlinux Irc: timlinux on #qgis at freenode.net ============================================== _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
