diff --git a/lazarus/lib/x86_64-linux/unit1.o b/lazarus/lib/x86_64-linux/unit1.o index 4af2181..dcf1301 100644 Binary files a/lazarus/lib/x86_64-linux/unit1.o and b/lazarus/lib/x86_64-linux/unit1.o differ diff --git a/lazarus/lib/x86_64-linux/unit1.ppu b/lazarus/lib/x86_64-linux/unit1.ppu index 61f5abb..90eccd5 100644 Binary files a/lazarus/lib/x86_64-linux/unit1.ppu and b/lazarus/lib/x86_64-linux/unit1.ppu differ diff --git a/lazarus/lib/x86_64-linux/unitipcthread.o b/lazarus/lib/x86_64-linux/unitipcthread.o index 368bc27..9bb6c4d 100644 Binary files a/lazarus/lib/x86_64-linux/unitipcthread.o and b/lazarus/lib/x86_64-linux/unitipcthread.o differ diff --git a/lazarus/lib/x86_64-linux/unitipcthread.ppu b/lazarus/lib/x86_64-linux/unitipcthread.ppu index b3b4d59..f9463e1 100644 Binary files a/lazarus/lib/x86_64-linux/unitipcthread.ppu and b/lazarus/lib/x86_64-linux/unitipcthread.ppu differ diff --git a/lazarus/phpgui-x86_64-linux b/lazarus/phpgui-x86_64-linux index ea0f110..bca02f6 100755 Binary files a/lazarus/phpgui-x86_64-linux and b/lazarus/phpgui-x86_64-linux differ diff --git a/lazarus/unitipcthread.pas b/lazarus/unitipcthread.pas index 151d352..33a5483 100644 --- a/lazarus/unitipcthread.pas +++ b/lazarus/unitipcthread.pas @@ -429,6 +429,7 @@ procedure TIpcThread.SetObjectProperty; propertyValue: Variant; propInfo: PPropInfo; subpropertyName: String; + messageId: Integer; begin // param[0] = objectId // param[1] = propertyName @@ -467,6 +468,9 @@ procedure TIpcThread.SetObjectProperty; begin // @TODO: Convert propertyValue to a object checking with PropIsType and GetObjectPropClass SetPropValue(obj, propertyName, propertyValue); + + messageId := jData.FindPath('id').AsInteger; + Output('{"id": ' + IntToStr(messageId) + ',"result": { "propertyName": "' + propertyName + '", "propertyValue": "' + VarToStr(propertyValue) + '"}}'); end; end; end; diff --git a/src/Components/LazarusObjectInterface.php b/src/Components/LazarusObjectInterface.php index fbf3b11..ca3a798 100644 --- a/src/Components/LazarusObjectInterface.php +++ b/src/Components/LazarusObjectInterface.php @@ -28,10 +28,11 @@ public function getLazarusClass(); * Fire an object event * * @param string $eventName Event Name + * @param array $arguments Aguments * * @return void */ - public function fire($eventName); + public function fire($eventName, array $arguments = []); /** * Add a listener to an event diff --git a/src/Components/Object.php b/src/Components/Object.php index 2281235..8a162c6 100644 --- a/src/Components/Object.php +++ b/src/Components/Object.php @@ -194,8 +194,14 @@ protected function set($name, $value) $name, $value ], - function ($result) { - // Ok, the property changed + function ($result) use ($name, $value) { + $this->fire( + 'onpropertySet', + [ + $name, + $value + ] + ); } ); } @@ -234,11 +240,11 @@ public function getLazarusClass() /** * {@inheritdoc} */ - public function fire($eventName) + public function fire($eventName, array $arguments = []) { if (array_key_exists($eventName, $this->eventHandlers)) { foreach ($this->eventHandlers[$eventName] as $eventHandler) { - $eventHandler(); + call_user_func_array($eventHandler, $arguments); } } }