It wasn't as hard as it may look. I already had my XML DOM/Parser module (the code of a Smalltalk class) ready for reuse from other projects I had done in Squeak, so all I had to do was to configure it to handle Scratch Scipts
Jens- Do you think you can perhaps make projects that stimulate "Peacefulness" for my gallery??? So far, mine is not looking so good because I am creating all my projects except 1! *Boo Hoo*
No, maxsteele2, Squeak doesn't use the standard keyboard shortcuts of MS Windows, but has its own ones. In Squeak you actually use "alt-a" to select all, and "alt-c" to copy the selected text to the clipboard. (If you're using a Mac you use the cmd-key instead of alt). BTW that's another "Scratch-secret"...
I don't have enough knowledge to properly comment this project, but I can recognize an excellent tool when I see it. BRAVO, Jens! "Flip" was good already; "XML" is great. I love it.
you know that is a bralliant alternitive to programming on squeak but yet you can use your project for multi purposes, or in reverse maybe you could make string variables using squeak and convert it.
Ahhhh, forget what I said - Again, I have got it working now. Sorry for clogging up the comment area. One quick question, can you impliment this into scratch, not the sqeak version.
Whoa, Eric, "Scratch for Second Life", that makes me *very* curious! Glad you find this useful. I've got some issues with the "architecture" of my code (the XML DOM probably shouldn't distinguish between content and nodes, and instead of an external "XMLConverter" class the conversion methods should probably be categories of the blocks themselves, but it's easier for me to maintain it the way it is...). Also, I've got some other methods I didn't (yet) publish, like compressing, storing and retrieving graphics within the xml format. If you're interested in any of these, just let me know!
This helps A LOT!! all i can say is your projects are really good! sorry i have to add you to friends list again since this is my new account the Lanie624 account was all messed up for some reason!
Thanks for the kind comments, folks. I didn't write the XML interface for the Scratch Team to consider including it into the official release of Scratch, it was (and still is) just a "quick and dirty" hack which provides a customized Scratch app with a nonvalidating (and thus error prone and unstable) XML-interface. I like to imagine how something like it could be used to build external utility applications around Scratch, which wouldn't need to know how to write files in Scratch's hideously complex binary file format (which is really only reproducable in a Squeak/Scratch version and hardly in any other programming language).
Excellent. I wonder if the Scratch team would be willing to consider incorporating new functions built and Beta tested by others? I'm still yearning for the ability to rename variables and broadcasts. Too often, I get into a project, (thinking I know exactly "where I'm going" with it) and then find I'm using a variable or a broadcast for something that its name no longer describes. I don't think I'll be learning Squeak anytime soon tho...
Clunk. That was my jaw dropping to the floor. You continue to amaze. Now, please put an XML interface on Scratch so that projects can alter their own coding dynamically! I bet you could do it if you wanted to....
This project packages the Squeak source code of my own nonvalidating XML DOM/parser, a ScratchXMLConverter and some very simple accessor methods for Scratch CommandBlocks within an unconnected "think" block within itself, thereby shamelessly exploiting the possibility to store strings of infinite (?) length containing any kinds of special characters (lf, cr) in some Scratch fields. Caution: The Squeak code is "bleeding edge" level, and you are more than likely to encounter all kinds of bugs and errors. Besides, there's really not much you can do with it other than build your own applications utilizing the xml-interface specified here.
Download "xml"(3 sprites and 16 scripts) and open it in Scratch
Project Notes
- caution: experimental -
this project includes a patch which lets you export scripts (blocks and stacks) into editable text files using an XML format, and import such XML files as scripts back into Scratch.
It also tells you how to install this patch into the officially published Scratch source code version. 1.2.1
The XML format produced by this patch is translation independent and should work with any national language you select in Scratch. It also works with any old ('obsolete') blocks of previous Scratch versions, but not with the comment block of the v.1.2 BETA.
This patch will not break any compatibility. Any projects created using its features will also work online.
Note: This is really only suitable and useful for experienced Squeak hackers.
Feel free to use and modify the source code of this patch anyway you like.
Comments
You need to be logged in to post comments
Add a Comment
how do you figure this stuff out?
(view all replies)Comment Reply
It wasn't as hard as it may look. I already had my XML DOM/Parser module (the code of a Smalltalk class) ready for reuse from other projects I had done in Squeak, so all I had to do was to configure it to handle Scratch Scipts
(view all replies)Comment Reply
you are a really great squeak hacker
(view all replies)Comment Reply
this is you're most usefull invention yet!
(view all replies)Comment Reply
(but it's already in chirp.)
(view all replies)Comment Reply
Hey, Question: Can you make a custom save block? I can't seem to get the Source Code up...
(view all replies)Comment Reply
in fact, I have done just that. Check out my Lists and Files prototype at: http://chirp.scratchr.org/blog
(view all replies)Comment Reply
Jens- Do you think you can perhaps make projects that stimulate "Peacefulness" for my gallery??? So far, mine is not looking so good because I am creating all my projects except 1! *Boo Hoo*
(view all replies)Comment Reply
I posted another comment on your chirp blog in scratch2exe.
(view all replies)Comment Reply
a pink box thingy pops up and it doesnt work O_o
(view all replies)Comment Reply
thnx! but whats ctrl do?
(view all replies)Comment Reply
No, maxsteele2, Squeak doesn't use the standard keyboard shortcuts of MS Windows, but has its own ones. In Squeak you actually use "alt-a" to select all, and "alt-c" to copy the selected text to the clipboard. (If you're using a Mac you use the cmd-key instead of alt). BTW that's another "Scratch-secret"...
(view all replies)Comment Reply
and ctrl-a
(view all replies)Comment Reply
u mean ctrl-c
(view all replies)Comment Reply
pleez click the love it button if you like it
(view all replies)Comment Reply
(link to project)
(view all replies)Comment Reply
I don't have enough knowledge to properly comment this project, but I can recognize an excellent tool when I see it. BRAVO, Jens! "Flip" was good already; "XML" is great. I love it.
(view all replies)Comment Reply
i didnt even know u could do that!! Dankt Jens
(view all replies)Comment Reply
Krüpelli!
(view all replies)Comment Reply
(link to project)
(view all replies)Comment Reply
Ok. I found it in http://scratch.mit.edu/pages/source
(view all replies)Comment Reply
I couldn't find how to run a source code image? Can someone tell please...
(view all replies)Comment Reply
Well, now that this is Top Loved, you have to add another Level!
(view all replies)Comment Reply
I DIDN'T NO THIS WAS EVEN POSSIBLE! ITS AWESOME!!
(view all replies)Comment Reply
yah uh... yah? wha?
(view all replies)Comment Reply
what?
(view all replies)Comment Reply
(link to project)
(view all replies)Comment Reply
you know that is a bralliant alternitive to programming on squeak but yet you can use your project for multi purposes, or in reverse maybe you could make string variables using squeak and convert it.
(view all replies)Comment Reply
whoa
(view all replies)Comment Reply
sweet
(view all replies)Comment Reply
This should be featured!
(view all replies)Comment Reply
(link to project)
(view all replies)Comment Reply
It's great! Actually worked. Thank you Jens!
(view all replies)Comment Reply
:O
(view all replies)Comment Reply
it actually worked awesome!
(view all replies)Comment Reply
Ahhhh, forget what I said - Again, I have got it working now. Sorry for clogging up the comment area. One quick question, can you impliment this into scratch, not the sqeak version.
(view all replies)Comment Reply
Forget what I said, it works now. But when I say that, I do all the suff you said but it doesn't work.
(view all replies)Comment Reply
wait... what program do I use to run a .image file
(view all replies)Comment Reply
ummm..either I can't find the image or it won't let me open it, but still... help!!!
(view all replies)Comment Reply
Whoa, Eric, "Scratch for Second Life", that makes me *very* curious! Glad you find this useful. I've got some issues with the "architecture" of my code (the XML DOM probably shouldn't distinguish between content and nodes, and instead of an external "XMLConverter" class the conversion methods should probably be categories of the blocks themselves, but it's easier for me to maintain it the way it is...). Also, I've got some other methods I didn't (yet) publish, like compressing, storing and retrieving graphics within the xml format. If you're interested in any of these, just let me know!
(view all replies)Comment Reply
Hi Jens- I've started incorporating this into my Scratch for Second Life project. It's incredibly helpful!
(view all replies)Comment Reply
this must have taken a while to figure out
(view all replies)Comment Reply
This helps A LOT!! all i can say is your projects are really good! sorry i have to add you to friends list again since this is my new account the Lanie624 account was all messed up for some reason!
(view all replies)Comment Reply
Me speechless.
(view all replies)Comment Reply
Thanks for the kind comments, folks. I didn't write the XML interface for the Scratch Team to consider including it into the official release of Scratch, it was (and still is) just a "quick and dirty" hack which provides a customized Scratch app with a nonvalidating (and thus error prone and unstable) XML-interface. I like to imagine how something like it could be used to build external utility applications around Scratch, which wouldn't need to know how to write files in Scratch's hideously complex binary file format (which is really only reproducable in a Squeak/Scratch version and hardly in any other programming language).
(view all replies)Comment Reply
Excellent. I wonder if the Scratch team would be willing to consider incorporating new functions built and Beta tested by others? I'm still yearning for the ability to rename variables and broadcasts. Too often, I get into a project, (thinking I know exactly "where I'm going" with it) and then find I'm using a variable or a broadcast for something that its name no longer describes. I don't think I'll be learning Squeak anytime soon tho...
(view all replies)Comment Reply
omg, jens, that's amazing. i know almost nothing about squeak, but this has convinced me i should download it.
(view all replies)Comment Reply
OOOOOO!
(view all replies)Comment Reply
Clunk. That was my jaw dropping to the floor. You continue to amaze. Now, please put an XML interface on Scratch so that projects can alter their own coding dynamically! I bet you could do it if you wanted to....
(view all replies)Comment Reply
This project packages the Squeak source code of my own nonvalidating XML DOM/parser, a ScratchXMLConverter and some very simple accessor methods for Scratch CommandBlocks within an unconnected "think" block within itself, thereby shamelessly exploiting the possibility to store strings of infinite (?) length containing any kinds of special characters (lf, cr) in some Scratch fields. Caution: The Squeak code is "bleeding edge" level, and you are more than likely to encounter all kinds of bugs and errors. Besides, there's really not much you can do with it other than build your own applications utilizing the xml-interface specified here.
(view all replies)Comment Reply
Wow!
(view all replies)Comment Reply