Hi Lars,
welcome to qooxdoo.
> Hi,
>
> I newly subscribed the list because I'm currently developing a RAP
> custom widget and I do have some problems with the JavaScript
> counterpart of my Java implementation. This question is regarding
> qooxdoos property system. I'm sure I missed some important points.
>
> My RAP widget passes an int[] named "pixel" to qooxdoo and the property
> system automatically call "setX" and "setY" to set the members from
> incoming int[] as below:
>
There is no apply method for grouped properties. Maybe in this special
case you are better off by using a dedicated method like
setPixel : function(x, y) {
this.__x = x;
this.__y = y;
this._drawPixel(x,y);
}
you could provide getter methods for x/y separately or provide a
combined getter.
Best Fabian
> properties : {
>
> x : {
> apply : "_drawPixel",
> init : null
> },
>
> y : {
> apply : "_drawPixel",
> init : null
> },
>
> pixel : {
> check : "Array",
> group : [ "x", "y" ]
> }
> },
>
> members : {
> _drawPixel : function(value, old) {
> // draw a pixel at [x,y]
> },
> ...
> }
>
> My question is: how can I ensure a single or atomic setter for grouped
> properties? If I want to draw a point at [x,y] how can I ensure that the
> _drawPixel method is called only once. Better said: is called only when
> property x AND y is initialized? Is there something like?
>
> pixel : {
> check : "Array",
> group : [ "x", "y" ],
> apply : "_drawPixel"
> }
>
> Any help is appreciated. Kindest regards, Lars
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
--
Fabian Jakobs
JavaScript Framework Developer
1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe
Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim
Weiss
Aufsichtsratsvorsitzender: Michael Scheeren
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel