dynamic object with properties

179 views
Skip to first unread message

keren potash

unread,
Nov 8, 2018, 1:38:42 AM11/8/18
to Blockly
Hi,
Maybe this topic has been written here before, but I couldn't find what I was looking for.

I try to create an object with properties.
but I want to do this dynamically, like the Variables Blocks.

I want that when I create an object, I can see the block in the menu, can get the block and set somethings (like Variables),
and also, when I create the properties's object (for example Cell object with x and y), those properties will create dynamically and in the menu I can find: Cell.x and Cell.y,  and can use them.

I`m trying use the "Extension and Mutators" tutorial (https://developers.google.com/blockly/guides/create-custom-blocks/extensions) but without success.

Maybe someone already develop Object/Struct/Class and I can use this in my code or maybe there is another tutorial that explain how to create dynamic blocks.

Thank you !! 

Mark Friedman

unread,
Nov 8, 2018, 12:33:35 PM11/8/18
to keren potash, blo...@googlegroups.com
Keren,

  I posted a link to an Object implementation for Blockly in this post to the Blockly group.  Also not that Bart Butenaers has expanded on that implementation.  See this post for more details on his enhancements.

  Hope this helps!

-Mark

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew n marshall

unread,
Nov 8, 2018, 2:49:23 PM11/8/18
to blo...@googlegroups.com
Thanks, Mark.  I was struggling to find an open source example.


Reply all
Reply to author
Forward
0 new messages