Discuss Scratch

stefanhoehn
New Scratcher
4 posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

I have developed a Scratch Extension (as described here. It worked pretty well until I updated lately to the latest offline scratch editor.)

1) I load my extension file (with pressing shift and accessing the file menu)
2) I then create a few blocks and it works well
3) I save the file (still everything is good)
4) I reload the file (without quitting Scratch) and all blocks become invalid (while shown in red)
5) I then reload the extension file and the blocks become valid again.
6) The same happens if I quit Scratch, load the extension file first, load my saved Scratch file and the blocks are shown as invalid. I then load the extension file and everything is fine.

You can reproduce the behaviour with any example that you provide in the above mention document (I first thought that I did something wrong in my extension file).

Do you have any idea?

I would really appreciate your help because I wrote an extension that we would like to use for our next Devoxx4Kids to control the "Parrot Jumping Sumo Drone" via Scratch which will be probably a lot of fun for the kids and which I am about to open source.



Last edited by stefanhoehn (March 29, 2016 19:50:43)

cs293450
Scratcher
100+ posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

I think so.
stefanhoehn
New Scratcher
4 posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

If you really have a solution, please be more clear.

Thanks
Stefan
cwillisf
Scratch Team
10 posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

Hi Stefan,

Sorry to hear you're having trouble. I will be looking into this issue and will try to fix it as soon as I can.

I heard from another group that changing the language setting in the editor – any change at all – may resolve the blocks correctly. Please let me know whether or not that works for you as it may help me diagnose the problem.

Thanks!
stefanhoehn
New Scratcher
4 posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

Hi Chris,

(thanks for taking it on from John :-) )

Yes, in fact it does as they say: Changing to a different locale fixes the blocks.

stefanhoehn
New Scratcher
4 posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

I tried it out and the problem described above is fixed with version 445.2 “but” I discoveded the following behavior:

I have two extension files which are equal (same extension name, blockspecs and menus) except for different translations in the description/menu descriptions/defaults-for-menus-in-blockspecs), so I can provide blocks in English and German (I am not aware of any localization feature in extensions) for kids in English and German speaking countries to support better adoption by the kids.

I now have the following behavior:

1) I load the German extension file, create some blocks and save the Scratch program “DE”.
2) I close Scratch (just to be clean) and restart Scratch.
3) I load the English extension file, create some blocks and save the Scratch program “EN”.
4) I load the German extension fie and load Scratch programm “EN”.

–> The result is that it automatically replaces my extension blocks to become english

This in fact looks like a nice behaviour because it makes sure that blocks and program are in sync but raises some questions

Questions:
a) Does it actually mean that the extension configuration is saved within the Scratch program?
b) Is it correct that I need to provide individual programs for the “different” localized extension files because menus with their values for the dropdowns and default values in the blockspecs don't match after changing to a localied extension file?

I am aware that this is still called “experimental” so I might have just fallen into the trap that localization is a missing feature in the specification which might have to be thought through before actually making out of the experimental state. I very much appreciate that extensions are there anyway and I could even live with no localization at all (even though it has some drawbacks).

Can you please revert on a) and b) ?

cheers
Stefan

abba29
Scratcher
1 post

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

stefanhoehn wrote:

I tried it out and the problem described above is fixed with version 445.2 “but” I discoveded the following behavior:

I have two extension files which are equal (same extension name, blockspecs and menus) except for different translations in the description/menu descriptions/defaults-for-menus-in-blockspecs), so I can provide blocks in English and German (I am not aware of any localization feature in extensions) for kids in English and German speaking countries to support better adoption by the kids.

I now have the following behavior:

1) I load the German extension file, create some blocks and save the Scratch program “DE”.
2) I close Scratch (just to be clean) and restart Scratch.
3) I load the English extension file, create some blocks and save the Scratch program “EN”.
4) I load the German extension fie and load Scratch programm “EN”.

–> The result is that it automatically replaces my extension blocks to become english

This in fact looks like a nice behaviour because it makes sure that blocks and program are in sync but raises some questions

Questions:
a) Does it actually mean that the extension configuration is saved within the Scratch program?
b) Is it correct that I need to provide individual programs for the “different” localized extension files because menus with their values for the dropdowns and default values in the blockspecs don't match after changing to a localied extension file?

I am aware that this is still called “experimental” so I might have just fallen into the trap that localization is a missing feature in the specification which might have to be thought through before actually making out of the experimental state. I very much appreciate that extensions are there anyway and I could even live with no localization at all (even though it has some drawbacks).

Can you please revert on a) and b) ?

cheers
Stefan

Hi Stefan,

I am teaching programming to primary school kids ( 6 - 10 years old) in France. Parrot jumping drones are quite motivating for them , So I was looking for the integration of these drones in scratch and what you have developped is exactly what I was looking for . I am not a java programmer (rather python), so it is rather hard for me to use the SDK's presented by Parrot.

I decided to blindly follow your instructions on github to make these work in a windows 10 environment. When I try to load the extension files (either English or German) nothing is loaded. I also tried to the examples in your workshop and this works , i.e. I have the extensions and the drone receives and executes the commands (THANK YOU VERY MUCH) with some issues :

- sumo-programm.sb2 (English) : forward and backward (speed, time) do work but with right, left (angle) no reaction from the drone
- jumping.sb2 (German) : OK with all the commands

Do you have an idea of why the extension file does not load ? ( I am using the last version of scratch 2.0)

I can understand the german commands (using a dictionnary !!) but this would rather be hard for the kids. Is there a way to make the English sumo-programm.sb2 function for all the commands ?

Great job of development !!
and thanks for sharing.

cheers,
Ahmad Abbassi


-frostyiceprincess-
Scratcher
1000+ posts

BUG: (Experimental) Scratch Extension block shown as invalid blocks until .s2e is loaded again

abba29 wrote:

-snip-

Please do not necropost. If you need help, please make a separate topic for it.

Powered by DjangoBB