A lot of Small Basic programs use "Assets" in order to work, e.g. images, sound and text files.
Key to Small Basic's effectiveness is our ability to share code and programs. At present the sharing of code is seamless but the sharing of programs may not be.
To demonstrate the difference I use the 2 following games:
The Program ID's are:
- NFV721-2 (Turtle Maze)
- XNF825 (Hangman)
Sharing the code for both these programs is seamless for SB students. You simply:
- copy the ID
- click on the Import icon in Small Basic
- paste the ID as prompted, and
- click OK to load
To share the "program" (meaning, running the code from the IDE), is seamless for Turtle Maze:
- do the above 4 steps, then
- click the Run icon in Small Basic
However sharing the Hangman "program" is NOT seamless:
- do the above 4 steps, then
- scroll down to line 83 and uncomment it
- click the Run icon in Small Basic
Program sharing is predominately done by posting ID's. Seamless sharing of programs is broken at the point where the File object is used. ALL native File members are disabled on publishing.
Having "Introductory Programming" as a part of mandatory school curriculum is becoming ever more popular and I think Small Basic is a top candidate resource.
So I wonder if it's possible and worth while considering if some if not all the File class members be given an extra optional parameter that could set if the operations are using a child of the Program.Directory(). Then these File statements be parsed by the Programs Listing script and exempt any instance that contains the value "True" from security commenting.
Just a thought and a desire for SB to be even more fun.