workspace.getBlockById(event.blockId) not working

132 views
Skip to first unread message

Wolfgang Koehler

unread,
May 2, 2016, 1:40:39 PM5/2/16
to Blockly
When I use the function workspace.getBlockById(event.blockId, found in the event documentation of blockly, I get a function not defined. Searching for a solution in the code I came across workspace.blockDB_[event.blockId] which does the trick for now.

Neil Fraser

unread,
May 2, 2016, 5:45:38 PM5/2/16
to blo...@googlegroups.com
Maybe you have a version of Blockly that's more than a month old?  Check to see if Blockly.Block.getById exists instead.

Here is the offending change:
https://github.com/google/blockly/commit/61b3fbfe11ad6bc130dd1065b5c54c23fe90eca8

On 2 May 2016 at 10:40, Wolfgang Koehler <wkthe...@gmail.com> wrote:
When I use the function workspace.getBlockById(event.blockId, found in the event documentation of blockly, I get a function not defined. Searching for a solution in the code I came across workspace.blockDB_[event.blockId] which does the trick for now.

--
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.



--

Wolfgang Koehler

unread,
May 3, 2016, 4:34:09 PM5/3/16
to Blockly, ro...@neil.fraser.name
Downloaded latest build and it works. Thanks
Reply all
Reply to author
Forward
0 new messages