Questions tagged [blockly]

Blockly is an open-source web-based, graphical programming environment that enables users to write JavaScript, Python, PHP, and Dart programs by moving around blocks. Developers can extend it to integrate with their own apps. It has been translated into over 40 (human) languages.

197 questions
2
votes
0 answers

Blockly Support for Class Types

I am using blockly in my application to achieve scratch Programming and I have requirement to for creating Complex Types and assigning to Variables while creating them. I have seen this blockly Pull request but this feature not yet available
Sohel Ahmed
  • 149
  • 2
  • 11
2
votes
1 answer

how to make custom blocks shape in blockly?

I'm trying to change the shapes of the blocks in blockly (https://developers.google.com/blockly/) to look more similar to scratch 3
the king
  • 31
  • 2
2
votes
1 answer

User input JavaScript with Electron - alternative to Window.Prompt()

First of all, I've asked a simpler version of this question before delving too much about it in here. However, as I searched things up, things got more complicated and I can describe it a little more. I'm trying to create an Electron App with…
BloodySinner
  • 95
  • 1
  • 9
2
votes
1 answer

Google Blockly `namespace never provided` Error with closure-compiler.jar

I asked at this issue, but I still can't solve a problem. I get error like required "Blockly" namespace never provided . I follow Google bLockly Advanced Compilation tutorial to try. I did not create a new directory in the Blockly root directory to…
2
votes
3 answers

Pushing a PHP array values into the JavaScript array?

I am working with Blockly to make some Blocks. All the errors came up when I am making Blockly Blocks. IS there anyone who knows why my code is not working in Blockly? I have a URL including a set of JSON code. I got the content in a myPhp.php file…
maziarser
  • 125
  • 1
  • 7
2
votes
1 answer

How can I check a radio button with no id using a single line of javascript (no jQuery)?

All right, this is a pretty specific question from a beginner, so bear with me. I'm a newbie just learning the ropes. Here's the background (skip to next para if you don't care): I'm updating my first android app and I'm using MIT App Inventor 2 to…
JPTiger
  • 25
  • 5
2
votes
0 answers

Working multiple block together in Blockly

I am having problem using Blockly. Whenever I am trying with two block only later get execute but not getting executed together to get desired output. Here I have used two block name moves and rotation and I need but the block should work together…
2
votes
1 answer

Google Blockly update Input type

I am currently trying to use Google Blockly (a visual code editor) in a project of mine. The example below shows a "block", with several inputs. What I am trying to do is, having a block add another input to itself based on the dropdown field…
Chrisstar
  • 626
  • 5
  • 23
2
votes
1 answer

Blockly, detect connection/removal/dragging/releasing a block

I searched the docs and the official forum but I could not find an answer. In Blockly, I'd like to detect the following things: when a block is connected to another one; when a block is removed from workspace; when workspace is empty; when a user…
user5273262
2
votes
2 answers

Unusual JavaScript for loop with xml in Blockly

I'm working on a project with Google's Blockly, but parts of the documentation are incomprehensible. Can someone help me understand the end condition of the following for loop (xml = allXml[i])? var allXml =…
user3708584
  • 161
  • 1
  • 1
  • 4
2
votes
1 answer

Google Blockly and AngularJS

I need to give a group of power users a way to create and save a math formula that will later be run as part of a shopping cart check-out routine. I'm must assume the power uses are not programmers but can follow simple instructions. The formulas…
Harvey Mushman
  • 615
  • 1
  • 11
  • 23
2
votes
3 answers

How to execute Python code generated by Blockly right in the browser?

I was following the example Blockly Code Generators and was able to generate Python codes. But when I run the Python code, I get an error. It seems the error is 'eval(code)' below, what should I do if I want to execute the Python code right inside…
ShungChing
  • 153
  • 1
  • 5
2
votes
2 answers

How do I get a value in the `onchange` event of a Blockly custom block?

I am making a custom block for Blockly and need to validate the inputs. In the onchange event, I want to warn the user if they are entering an invalid value for the input. Here is my block: Blockly.Blocks['motor'] = { init: function() { …
swatkins
  • 13,530
  • 4
  • 46
  • 78
2
votes
1 answer

How to output a message in Googles Blockly?

I'm having a bit of fun on https://blockly-games.appspot.com and have got to the last level where you can write full blown javascript (new Date().getTime(); is very handy). Despite having the console open in Chrome (ctrl-shift-j) I can't seem to…
candied_orange
  • 7,036
  • 2
  • 28
  • 62
2
votes
1 answer

Blockly domToWorkspace reset node IDs

I'm working on an code editor using blockly, and my page currently has tabs for switching between Block View and Code View, kinda like some WYSIWYG editors. Now, Blockly already has plenty of stuff for going from blocks to code, and I've gotten 99%…
zaparker
  • 485
  • 3
  • 14
1 2
3
13 14