<div dir="ltr"><div><div><div>Hello,<br></div>For the first question, I think you have done 
something like logFeaturesAdded(Idofmylayer, features) instead of 
doing self.logFeaturesAdded(Idofmylayer, features).The function you created has three args : self, layerId, addfeatures. When using it you should give him three args. The second expression has 
three arguments not the first one. Try that.<br><br></div>for your second question, give a look at self.iface.zoomToActiveLayer(), after having activated your layer. There may be another way but...<br><br></div>I think one good way to learn how to use all this is to make tests with the qgis Python Console and you'll quickly find the best functions to call.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-31 11:08 GMT+02:00 dandrigo <span dir="ltr"><<a href="mailto:lcelati@latitude-geosystems.com" target="_blank">lcelati@latitude-geosystems.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, thank for your reply.<br>
<br>
1/ For my pyqgis plugin 2.2, i try to<br>
-----------------------------------------------------------------------<br>
def logFeatureAdded(self,layerId,addfeatures):<br>
                message = str(layerId) + " has features added: "<br>
                for feature in addedFeatures:<br>
                        message += str( <a href="http://feature.id" target="_blank">feature.id</a>() ) + ", "<br>
                QgsMessageLog.logMessage(message)<br>
                QApplication.beep()<br>
------------------------------------------------------------------------<br>
<br>
When i try to add a feature, this following error message appears:<br>
<br>
TypeError : logFeaturesAdded() takes exactly 3 arguments (2 given).<br>
<br>
2/ Always for my plugin, i can load a vector layer succesfully. But when i<br>
try to zoom to the layer extent. But it does not work. How to do in order to<br>
zoom to the layer extent?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Get-signal-on-edited-feature-tp5154173p5154364.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Get-signal-on-edited-feature-tp5154173p5154364.html</a><br>

<div class="im HOEnZb">Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div>