Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Custom reporters make me happy
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
I have finally come up with a good Scratch extension. I'm not sure if anybody else has done this yet, but I have started working on an extension which allows for the creation of custom reporters.
You can view a screenshot of my progress so far: http://i.cubeupload.com/lCByn0.png
I hope to make a dedicated button overlayed over the editor for adding reporters as well as some other things, including parameters inside the reporter itself.
You can view a screenshot of my progress so far: http://i.cubeupload.com/lCByn0.png
I hope to make a dedicated button overlayed over the editor for adding reporters as well as some other things, including parameters inside the reporter itself.
my latest extension: 2d vector math
- Vetpetmon
- Scratcher
1000+ posts
Custom reporters make me happy
Fixed You can view a screenshot of my progress so far:
Pet peeve: Lag. Just, lag. Lag, lag, LAG SPIKE-
There is a need for perfection, even if it's unusual: www.vetpetmon.com
A retired Scratcher who won't be using scratch. I usually go on the forums. I mostly play Unturned, but sometimes, I make mods for games. Knows many programming languages: 100% of HTML, about 60% of CSS, 1% JS, 2% of C#, 50% TSC (for CS modding) and, 1% ASM. Is experienced at Beatbox. I also like writing stories about topics that are interesting to me. I'm well known for my variety of skills that range from programming, art, music, writing, and more. Yes, I have too many hobbies, and I am in 6 fandoms right now!
;
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
Thanks. I'm an NS, so I can't post images.http://i.cubeupload.com/lCByn0.pngFixed You can view a screenshot of my progress so far:
my latest extension: 2d vector math
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
Oh boy! I finally got custom params to work. Now all I have to do is add an interface for creating the blocks, and we're all set!
If you want a demo of working params, see the link at the bottom of this post. Just drag out the “create reporter” block, type in a name, and click on it.
http://scratchx.org/?url=http://themonsterfromthedeep.github.io/scratch-extensions/custom-reporters/script.js#scratch
If you want a demo of working params, see the link at the bottom of this post. Just drag out the “create reporter” block, type in a name, and click on it.
http://scratchx.org/?url=http://themonsterfromthedeep.github.io/scratch-extensions/custom-reporters/script.js#scratch
my latest extension: 2d vector math
- Jonathan50
- Scratcher
1000+ posts
Custom reporters make me happy
Looks cool!
Can you add the custom reporters to the descriptor and remove and then load the extension again with the custom reporters so they are actual blocks?
Wait I saw the latest one
Can you add the custom reporters to the descriptor and remove and then load the extension again with the custom reporters so they are actual blocks?
Wait I saw the latest one
Not yet a Knight of the Mu Calculus.
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
Yep. Looks cool!
Can you add the custom reporters to the descriptor and remove and then load the extension again with the custom reporters so they are actual blocks?
Wait I saw the latest one
Now I need to make it so that you can make a reporter without any hassle.
I also need to make it so when a reporter is called, it spawns a new process so if two of the same reporter are called at the same time, data isn't overwritten. I'm going to do that later though.
I have made it so that the “create reporter” button is colored differently based on whether you are in the scratchx editor or the scratch editor.
my latest extension: 2d vector math
- Jonathan50
- Scratcher
1000+ posts
Custom reporters make me happy
Oh noes
Not yet a Knight of the Mu Calculus.
- ChocolatePi
- Scratcher
1000+ posts
Custom reporters make me happy
I'm pretty sure this means you need to upgrade to a browser that supports ECMAScript 5
Oh noes
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
Hmm. That is a problem. I can't see “add reporter.”
Also, I realized the other big problem with this: there's no way to make a project remember what blocks were created. I might have an idea, using a “reload block” stack block, but I'm going to make sure the basic reporter thing works (including the “create reporter” button) before starting to work on the persistence issue.
my latest extension: 2d vector math
- Jonathan50
- Scratcher
1000+ posts
Custom reporters make me happy
Huh?I'm pretty sure this means you need to upgrade to a browser that supports ECMAScript 5
Oh noes
Chrome 44.0.2403.155
Not yet a Knight of the Mu Calculus.
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
I think I'm just going to add a little thing that still adds the button even if that error is thrown.Huh? -snip-
I'm pretty sure this means you need to upgrade to a browser that supports ECMAScript 5
Chrome 44.0.2403.155
I guess it's good that I have other people testing it - I've just been testing it in Firefox.
my latest extension: 2d vector math
- Jonathan50
- Scratcher
1000+ posts
Custom reporters make me happy
Apparently enabling experimental javascript features at
should fix it.
You could go
chrome://flags/#enable-javascript-harmony
You could go
if(!String.protopype.contains) { //make contains }
Not yet a Knight of the Mu Calculus.
- TimothyLawyer
- Scratcher
1000+ posts
Custom reporters make me happy
Maybe save it in a comment. Also, I realized the other big problem with this: there's no way to make a project remember what blocks were created. I might have an idea, using a “reload block” stack block, but I'm going to make sure the basic reporter thing works (including the “create reporter” button) before starting to work on the persistence issue.
BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?
☂️
- TimothyLawyer
- Scratcher
1000+ posts
Custom reporters make me happy
Or a variable/list.
BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?
☂️
- Znapi
- Scratcher
500+ posts
Custom reporters make me happy
Can't you just poll the hat blocks on load? Also, I realized the other big problem with this: there's no way to make a project remember what blocks were created. I might have an idea, using a “reload block” stack block, but I'm going to make sure the basic reporter thing works (including the “create reporter” button) before starting to work on the persistence issue.
The way I solved persistence issues in an abandoned extension project was by doing something like this:
when extension needs variable declarations :: extension hatAnd I'd pool “when extension needs variable declarations” on load. Declaring a variable would create the variable internally in the extension, and update block palette would populate the block palette with them so the project can use them.
declare variable [name] :: extension
declare variable [name] :: extension
update block palette :: extension
- Jonathan50
- Scratcher
1000+ posts
Custom reporters make me happy
Looks cool, but it doesn't return anything.
A suggestion:
Make the report block a cap
A suggestion:
Make the report block a cap
Not yet a Knight of the Mu Calculus.
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
Yes, that's what I'm planning. That's what my “reload block” idea was, although I'll probably call it “load block” and make you copy and paste a string so that all the inputs work out correctly and stuff.Can't you just poll the hat blocks on load? Also, I realized the other big problem with this: there's no way to make a project remember what blocks were created. I might have an idea, using a “reload block” stack block, but I'm going to make sure the basic reporter thing works (including the “create reporter” button) before starting to work on the persistence issue.
The way I solved persistence issues in an abandoned extension project was by doing something like this:when extension needs variable declarations :: extension hatAnd I'd pool “when extension needs variable declarations” on load. Declaring a variable would create the variable internally in the extension, and update block palette would populate the block palette with them so the project can use them.
declare variable [name] :: extension
declare variable [name] :: extension
update block palette :: extension
What do you mean? It does report something… and I guess I could make the report block a cap. I can't really work on this right now though sadly. Looks cool, but it doesn't return anything.
A suggestion:
Make the report block a cap
But you can't read or write any data to the project, including comments, variables, and lists.Maybe save it in a comment. Also, I realized the other big problem with this: there's no way to make a project remember what blocks were created. I might have an idea, using a “reload block” stack block, but I'm going to make sure the basic reporter thing works (including the “create reporter” button) before starting to work on the persistence issue.
my latest extension: 2d vector math
- ev3coolexit987654
- Scratcher
1000+ posts
Custom reporters make me happy
Yay! Seems to work. I need inputs though.
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
Custom reporters make me happy
The reload reporter block does generate inputs. For example, the text “throw (count) oranges” will generate a reporter with a number input called “count.” Yay! Seems to work. I need inputs though.
The main problems right now:
-reload reporter block generates duplicate reporters
-no interface for creating reporters
my latest extension: 2d vector math
- Discussion Forums
- » Developing Scratch Extensions
- » Custom reporters make me happy