Seeking help with Toolbox Categories

28 views
Skip to first unread message

Ahana Ghosh

unread,
Sep 17, 2022, 12:00:33 AM9/17/22
to Blockly Games
Hi,

I am trying to create a toolbox with categories for a blockly maze game. I have added the <category name="Custom"></category> tag to my html.js file. However, it is not being recognized. I get the following error during display of the toolbox: 

Uncaught Error: Unable to find [default][toolbox] in the registry. You must require or register a toolbox plugin

I have tries to register a CustomCategory class in my maze.js file (as explained in the blockly toolbox tutorial), however, it still does not seem to work. Any help would be greatly appreciated!

Thanks and Regards,
Ahana

Neil Fraser

unread,
Sep 17, 2022, 10:49:28 AM9/17/22
to Blockly Games
You'll need to add this require to main.js:
goog.require('Blockly.Toolbox');

Most Blockly instances would already have the toolbox available, but Blockly Games puts a lot of emphasis on stripping out unneeded code, in order to get the smallest download possible.

--
You received this message because you are subscribed to the Google Groups "Blockly Games" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly-game...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly-games/e567d3a7-f890-45ba-b1fe-c300da8f8784n%40googlegroups.com.


--

Ahana Ghosh

unread,
Sep 17, 2022, 10:50:42 AM9/17/22
to blockl...@googlegroups.com

Thanks a lot! This helped resolve the issue :)

Reply all
Reply to author
Forward
0 new messages