How to load a default project at startup

Ok. Beautiful page :slightly_smiling_face: And then... (sorry, I'm a repository noob)

Thank!
Feedback a question:When the default language is not English, xml cannot be loaded.
==============================================================
i found it.
gui.js
line 705: this.loadNewProject = true; //change ---->this.loadNewProject = false;

To make fewer moving parts, you may create eg. "bootstrap.html" with iframe pointing to snap.html directory.
The project XML is loaded with standard :snap: inter-frame comm api.

<!DOCTYPE html>
<html>
  <head>
    <script>
        window.addEventListener(
          "load"
          , function(){
              let project ="escape project XML here at https://jsfiddle.net/y0wsp57n/4/ ";
              document.getElementById("snap").contentWindow.postMessage( { selector :"loadProjectXML", params :[ unescape( project)]}, "*");
            }
      );
    </script>
  </head>
  <body>
    <iframe id="snap" src="snap.html" style="position:absolute; top:0; left:0; width:100%; height:100%; border:0"></iframe>
  </body>
</html>

This way, you can create multiple bootstrap html with different projects, using a single :snap: instance.
Strings embedded in HTML should be encoded :link:

If you want/can lift the restrictions with eg.
"path_to_chrome\chrome.exe" --user-data-dir=/tmp/unsafe --allow-file-access-from-files file:///d:/work/snapmaster.v8/bootstrap.html
it can be further streamlined to

<!DOCTYPE html>
<html>
  <head>
    <script>
        window.addEventListener(
          "load"
          , function(){
              let project = document.getElementById("project").contentDocument.documentElement.outerHTML;
              document.getElementById("snap").contentWindow.postMessage( { selector :"loadProjectXML", params :[ project]}, "*");
            }
      );
    </script>
  </head>
  <body>
    <iframe id="project" src="Examples/animal-game.xml" hidden></iframe>
    <iframe id="snap" src="snap.html" style="position:absolute; top:0; left:0; width:100%; height:100%; border:0"></iframe>
  </body>
</html>

Still waiting for someone telling me how to download the latest Snap code

FYI In general, the Snap! master branch contains the latest developments, there isn't a separate "dev" branch.

Thanks, but it doesn't seem so. It says released in August, and when I download it all files are dated august, 4th. So, how do I download the latest version with all the commits included?

eh? seriously, just download the repo, not a release.

I told you Jens. I don't know a thing about repos. I can just go there, and click download. Now I changed to the "default" branch (I don't even know how branches are handled) and it seems that has recent changes. As it was the "default", I supposed it was what I was seeing, but I was wrong (and I don't even understand why I was wrong)

I really don't understand all these questions. Why can't you just use Snap! as it is?

Maybe the problem was that I was accessing the code from the Snap editor link?

I need a default project :slight_smile:

Look at @moodykeke last post and click on the links pointed to

I get that, Stefano. My question is, isn't dragging-and-dropping a file into a window an accessible user interface for university students, and if so, how come?

Thanks everybody. It worked! And sorry for bothering you all with unimportant stuff unrelated to Snap.

I'm dealing with middle school students that never heard about programming (and don't even use a PC as today's young people only use cellphones; so dragging and dropping is something strange to them). Last point: as you know, my position is "don't ask them to do something that could be done automatically, as the uninterested part ot them (about 70%) will immediately stop listening to you"

(background story: I'm creating a pseudolanguage for them without using my old BloP, that I never updated to 8.0; and 8.0 is so much better)

Ah, got it, thanks! And good luck with the project!

A few more questions (so that my students have the same view that I use when I explain): where can I force the following setting (it doesn't matter if they override them next; it would be their responsibility):

  • language: it
  • block zoom: 1.2
  • flat design
  • no zebra coloring

I'm currently working on ways that will let you configure all of this in the next release. But I'm already beginning to regret it, because I can already see that it'll be used as an excuse to cripple Snap. What a pity.

I’m sorry Jens, you made too good a programming environment :slightly_smiling_face: Snap! is not only an incredible language to learn programming when you are interested in it. It can be used to teach to (un)interested students too as it can engage them in multiple ways. But, as I said, when you teach to a class of 120 uninterested students (as I do) you need to have exactly the same settings as them, so that you don’t need to move to each student when they find something different and panic (otherwise your lesson will last much less than expected). That is why your next update is not going to cripple Snap, but it is another very useful feature for us teachers.