Discuss Scratch

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.

Vetpetmon
Scratcher
1000+ posts

Custom reporters make me happy

TheMonsterOfTheDeep wrote:

You can view a screenshot of my progress so far:
Fixed

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

Vetpetmon wrote:

TheMonsterOfTheDeep wrote:

You can view a screenshot of my progress so far: http://i.cubeupload.com/lCByn0.png
Fixed
Thanks. I'm an NS, so I can't post images.

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

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

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

Jonathan50 wrote:

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
Yep.

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.

Jonathan50
Scratcher
1000+ posts

Custom reporters make me happy


Oh noes

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
ChocolatePi
Scratcher
1000+ posts

Custom reporters make me happy

Jonathan50 wrote:


Oh noes
I'm pretty sure this means you need to upgrade to a browser that supports ECMAScript 5
Furious-
Scratcher
24 posts

Custom reporters make me happy

I can't see “add reporter.”
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

Furious- wrote:

I can't see “add reporter.”
Hmm. That is a problem.


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.

Jonathan50
Scratcher
1000+ posts

Custom reporters make me happy

ChocolatePi wrote:

Jonathan50 wrote:


Oh noes
I'm pretty sure this means you need to upgrade to a browser that supports ECMAScript 5
Huh?
Chrome 44.0.2403.155

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

Jonathan50 wrote:

ChocolatePi wrote:

-snip-
I'm pretty sure this means you need to upgrade to a browser that supports ECMAScript 5
Huh?
Chrome 44.0.2403.155
I think I'm just going to add a little thing that still adds the button even if that error is thrown.

I guess it's good that I have other people testing it - I've just been testing it in Firefox.

Jonathan50
Scratcher
1000+ posts

Custom reporters make me happy

Apparently enabling experimental javascript features at
chrome://flags/#enable-javascript-harmony
should fix it.
You could go
if(!String.protopype.contains)
{
  //make contains
}

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
TimothyLawyer
Scratcher
1000+ posts

Custom reporters make me happy

TheMonsterOfTheDeep wrote:

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.
Maybe save it in a comment.
TimothyLawyer
Scratcher
1000+ posts

Custom reporters make me happy

Znapi
Scratcher
500+ posts

Custom reporters make me happy

TheMonsterOfTheDeep wrote:

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.
Can't you just poll the hat blocks on load?

The way I solved persistence issues in an abandoned extension project was by doing something like this:
when extension needs variable declarations :: extension hat
declare variable [name] :: extension
declare variable [name] :: extension
update block palette :: extension
And 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.
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

Paddle2See wrote:

AT is for advanced Scratch - and non-Scratch topics.
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

Znapi wrote:

TheMonsterOfTheDeep wrote:

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.
Can't you just poll the hat blocks on load?

The way I solved persistence issues in an abandoned extension project was by doing something like this:
when extension needs variable declarations :: extension hat
declare variable [name] :: extension
declare variable [name] :: extension
update block palette :: extension
And 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.
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.

Jonathan50 wrote:

Looks cool, but it doesn't return anything.
A suggestion:
Make the report block a cap
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.

TimothyLawyer wrote:

TheMonsterOfTheDeep wrote:

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.
Maybe save it in a comment.
But you can't read or write any data to the project, including comments, variables, and lists.

ev3coolexit987654
Scratcher
1000+ posts

Custom reporters make me happy

Yay! Seems to work. I need inputs though.

=0
TheMonsterOfTheDeep
Scratcher
1000+ posts

Custom reporters make me happy

ev3coolexit987654 wrote:

Yay! Seems to work. I need inputs though.
The reload reporter block does generate inputs. For example, the text “throw (count) oranges” will generate a reporter with a number input called “count.”

The main problems right now:
-reload reporter block generates duplicate reporters
-no interface for creating reporters

Powered by DjangoBB

Standard | Mobile