[squeakland] [Q] How to export a script

Yoshiki Ohshima yoshiki at vpri.org
Wed Aug 12 12:19:09 EDT 2009


At Tue, 11 Aug 2009 11:44:22 -0500,
Young-Jin Lee wrote:
> 
> Hi,
> 
> I am looking for a way to export a script in one project so that it can be used in another project. I looked for
> contextual menus and googled it, but found no solution yet. Can anyone tell me if it is possible?

  Like Karl wrote, a script is tied to its player (player's uniclass,
really).  One thing you can do is, to turn the "debugHaloHandle"
preference on, get the halo of the object and from the gray debug
menu, choose "save morph in file" to create a .morph file.  It saves
the morph's player altogether.  Later you can load it from "find any
file" or dragging the .morph file from Explorer/Finder to the Squeak
window.

  For Supplies Bin, there is a machinary to save all the user defined
objects but there is no simple UI;  If you know what to type as
Smalltalk expression for the Supplies bin, you can do it.

> Also, I have another question about using a movie file in etoy. In one of the demo projects that comes with etoy (a
> free-fall experiment), I found a set of JPEG images imported from a movie file. Does etoy can save selected frames from
> a movie as image files? If not, what is the best way to create image files from a movie file so that they can be used in
> etoy?

  If the movie file in the format supported by the MPEGMoviePlayer or
GStreamerMoviePlayer, getting out frames programatically can be done.
Otherwise, I'd use an external tool...  Could be a Windows Movie Maker
or iMovie but can be cumbersome.  Does anybody have a better idea?

-- Yoshiki


More information about the squeakland mailing list