Discuss Scratch

Boomer001
Scratcher
1000+ posts

Warning text?

So I have been playing around with “Blockly” in javascript and there are some interesting things. And… there is a warning text?
Blockly.getMainWorkspace().getAllBlocks()[0].setWarningText("example")
Try running this in the JS console. I recommend having only one block in the editor. So when you do that, a warning icon appears.

When you click the warning icon, the warning text you gave appears above the block:

I have never seen the warning text before. What is its use?


???













(- ͜-) // This is mister sneaky. He projects my siggy against evil kumquats. 
// Do you see error 666 above? That was an evil kumquat. But mister sneaky turned him into error 666.
// His name is that because its at the bottom of my siggy; very sneaky...




















Be moist






















TheSassyDiamond
Scratcher
50 posts

Warning text?

Oh, that is a bit creepy, you might want to contact the ST or notify them, but the code above that has most likely resulted in that because of what it says. I have never seen it before either, I have no idea what it's use is. Probably and EXAMPLE of what a warning looks like because it says “example”
Boomer001
Scratcher
1000+ posts

Warning text?

TheSassyDiamond wrote:

Probably and EXAMPLE of what a warning looks like because it says “example”
You can change it by changing the string in the code.
Blockly.getMainWorkspace().getAllBlocks()[0].setWarningText("[YOUR TEXT HERE]")


???













(- ͜-) // This is mister sneaky. He projects my siggy against evil kumquats. 
// Do you see error 666 above? That was an evil kumquat. But mister sneaky turned him into error 666.
// His name is that because its at the bottom of my siggy; very sneaky...




















Be moist






















Maximouse
Scratcher
1000+ posts

Warning text?

Well, Blockly has many features Scratch doesn't use (such as mutators), so it isn't very surprising that there is another one. But I didn't know about warning text either.

You are reading Maximouse's signature. Learn more about signatures
Click here to make pixel art.

Harakou wrote:

Yeah, this seems to be a request for custom reporter blocks - which has been suggested in the linked topic and a number of other times. I know I would personally love to see them, myself - I'm not sure what technical or design concerns there to them, if any.
Sheep_maker
Scratcher
1000+ posts

Warning text?

That was what the comments and block definitions looked like temporarily in the development of 3.0 iirc so it's probably a Blockly thing

Maximouse wrote:

Well, Blockly has many features Scratch doesn't use (such as mutators), so it isn't very surprising that there is another one. But I didn't know about warning text either.
Based on the documentation for mutators, doesn't Scratch use it for custom blocks and the stop _ block?

- Sheep_maker This is a kumquat-free signature. :P
This, my signature, appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
Maximouse
Scratcher
1000+ posts

Warning text?

Sheep_maker wrote:

Maximouse wrote:

Well, Blockly has many features Scratch doesn't use (such as mutators), so it isn't very surprising that there is another one. But I didn't know about warning text either.
Based on the documentation for mutators, doesn't Scratch use it for custom blocks and the stop _ block?
I meant mutator UI.

You are reading Maximouse's signature. Learn more about signatures
Click here to make pixel art.

Harakou wrote:

Yeah, this seems to be a request for custom reporter blocks - which has been suggested in the linked topic and a number of other times. I know I would personally love to see them, myself - I'm not sure what technical or design concerns there to them, if any.

Powered by DjangoBB

Standard | Mobile