diff options
-rw-r--r-- | src/MTools.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/MTools.pm b/src/MTools.pm index 3dcf29a..436fe95 100644 --- a/src/MTools.pm +++ b/src/MTools.pm @@ -342,7 +342,7 @@ sub plink { } sub plisten { - my ($obj, $key, $methode) = @_; + my ($obj, $key, $methode, $executer) = @_; # Si la propriete est une propriete zinc, on la transforme en propriete MTools # et on lie la modification de la propriete MTools a la propriete zinc @@ -352,8 +352,9 @@ sub plisten { plink ([$obj, $key], [$obj -> {instance}, $key]); } push (@{$obj -> {__properties} -> {$key} -> {listeners}}, $methode); - #mconfigure ($obj, $key => mget ($obj, $key)); - executer($methode,$obj, $key,mget ($obj, $key)); + if (!defined $executer || $executer) { + executer ($methode, $obj, $key, mget ($obj, $key)); + } return $methode; } |