To take Graphics as an example only.
My intention is not to change Graphics. But in myownClass it would be nice to have.
We have functions to set bgColor and to get bgColor.
Is there a way to define a writeable property in jswrap_xxx file ?
So instead of using myGraphics.setBgColor(newColor); it would be myGraphics.BgColor = newColor;
And instead of var x = myGraphics.getBgColor(); it would be var x = myGraphics.BgColor;
Following API-description for Object.defineProperty, writeable and get/set are not supported.
Hmmm, but in jswrap_object_defineProperty get and set are used to create getter and setter
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
To take Graphics as an example only.
My intention is not to change Graphics. But in myownClass it would be nice to have.
We have functions to set bgColor and to get bgColor.
Is there a way to define a writeable property in jswrap_xxx file ?
So instead of using myGraphics.setBgColor(newColor); it would be myGraphics.BgColor = newColor;
And instead of var x = myGraphics.getBgColor(); it would be var x = myGraphics.BgColor;
Following API-description for Object.defineProperty, writeable and get/set are not supported.
Hmmm, but in jswrap_object_defineProperty get and set are used to create getter and setter