Hi,
I am a real novice Squeaker and have a question of how to get the code of an eToy I created (or generally source code of morph projects). I know how to save the eToy project into *.pr file, but it is not readable file.
As an experienced Java programmer, I want to see what's created from the visual programming of eToy and other morph projects.
Thanks in advance.
Young-Jin Lee
Hello, Young-Jin,
I am a real novice Squeaker and have a question of how to get the code of an eToy I created (or generally source code of morph projects). I know how to save the eToy project into *.pr file, but it is not readable file.
As an experienced Java programmer, I want to see what's created from the visual programming of eToy and other morph projects.
It involves quite a few stuff.
A tile sctipt creates the textual representation internally. The textual code is then compiled by the standard Compiler to produce a CompiledMethod. If you click on the small rectangle switch in the "scriptor" (whose balloon help that says: "toggle between showing tiles and showing textual code"), you can see the decompiled method in textual form. You can usually evaluate a part of textual script by selecting it and choose "do-it" from the right-click menu. It would help you to understand what each statement in the script does.
Because the code is unique to the particular object, it is attached to a newly created class called a "uniclass". Uniclass provides the prototype-based object model on top of the class-based Squeak object model.
The objects (and the graph of references between them) are serialized by the SmartRefStream. The objects includes the uniclasses CompiledMethods and tiles, etc. So, the code is stored as the serialized objects. Yes, and that is why it is a binary file.
-- Yoshiki
Is there a way to gain access to OS filesystem capabilities from within Squeak?
-Kyle H
On 5/14/06, Yoshiki Ohshima yoshiki@squeakland.org wrote:
Hello, Young-Jin,
I am a real novice Squeaker and have a question of how to get the code of an eToy I created (or generally source code of morph projects). I know how to save the eToy project into *.pr file, but it is not readable file.
As an experienced Java programmer, I want to see what's created from the visual programming of eToy and other morph projects.
It involves quite a few stuff.
A tile sctipt creates the textual representation internally. The textual code is then compiled by the standard Compiler to produce a CompiledMethod. If you click on the small rectangle switch in the "scriptor" (whose balloon help that says: "toggle between showing tiles and showing textual code"), you can see the decompiled method in textual form. You can usually evaluate a part of textual script by selecting it and choose "do-it" from the right-click menu. It would help you to understand what each statement in the script does.
Because the code is unique to the particular object, it is attached to a newly created class called a "uniclass". Uniclass provides the prototype-based object model on top of the class-based Squeak object model.
The objects (and the graph of references between them) are serialized by the SmartRefStream. The objects includes the uniclasses CompiledMethods and tiles, etc. So, the code is stored as the serialized objects. Yes, and that is why it is a binary file.
-- Yoshiki _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Kyle,
Is there a way to gain access to OS filesystem capabilities from within Squeak?
Can you elaborate a bit the meaning of "gain access to OS filesystem capabilities"? If it is basic reading, writing, and deleting files and directories, of course Squeak provides class library to support it. Look at FileDirectory and FileStream classes and browse their methods.
If it involves something like making symbolic links, calling ioctl(), etc., the basic class library of Squeak doesn't provide the support... You need to use OSProcess to make OS dependent system calls.
Anways, the shorter answer is: "yes".
-- Yoshiki
(Why is this question under this subject?)
beginners@lists.squeakfoundation.org