Re: How to change INDENT?

254 views
Skip to first unread message

Beka Westberg

unread,
Mar 4, 2021, 5:36:40 PM3/4/21
to blo...@googlegroups.com
Hi Chris,

> What sorcery is this?
Lol if only it were sorcery. Then maybe it would be easier to debug!

There are two issues I can think of that might be causing this:

1) Are you setting the Blockly.Python.INDENT to a string, eg '    '? The property does not support setting it to a number. From your description it doesn't sound like this is the issue but I wanted to mention it anyway.
2) Your test page isn't loading your modifications. If you do `console.log(Blockly.Python.INDENT.length)` right before generating your code, what does it output? If it outputs 2 then you might be modifying the value after the code is generated, or you might be loading the wrong file.

I hope that gives you some places to start! If you have any further questions I'm happy to help :D
--Beka




On Thu, Mar 4, 2021 at 1:21 PM Chris Warkentin <kewa...@gmail.com> wrote:
This seems like it should be simple but I've tried everything. I'm trying to change Blockly.Python.INDENT to be four spaces but setting it does nothing. Setting Blockly.Generator.prototype.INDENT does nothing. Even changing Blockly.Generator.prototype.INDENT right in the blockly_compressed.js doesn't seem to work. What sorcery is this?

cheers,

Chris

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/3996f31e-761b-4488-825f-cf02f7442f5cn%40googlegroups.com.

feni...@google.com

unread,
Mar 5, 2021, 4:19:53 PM3/5/21
to Blockly
Are you loading the compressed generator without rebuilding?
Reply all
Reply to author
Forward
0 new messages