Hi,
-- I'm playing around with the HTML5 Canvas wrapper library KineticJS in Amber but I can't find a way to call constructor functions that take parameters. For example, How would I reproduce this JS call in Amber: var rect = new Kinetic.Rect({ x: 239, y: 75, width: 100, height: 50, fill: 'green', stroke: 'black', strokeWidth: 4 }); Best regards Andy Bower You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Replying to my own question, I think I've found it here:
-- http://forum.world.st/BlockClosure-as-a-JavaScript-constructor-td4162123.html Now Amber has BlockClosure>>newValue: and #newValue:value: #newValue:value:value: here's an example: new Foo(); // JS version Foo new. "Amber version" new Foo(1,2); // JS version Foo newValue: 1 value: 2. "Amber version" Best regards Andy Bower On Friday, January 10, 2014 8:48:07 PM UTC, bowerandy wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Hello Andy,
-- On Sat, Jan 11, 2014 at 1:47 AM, bowerandy <[hidden email]> wrote:
thanks for the examples. I added them to the Amber Recipies collection here: Best, Manfred
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |