Howdy!
I'd like some tips on how to develop a collection of linked Squeak projects, much like the standard ones distributed with the XO image.
Here're my imagined "use cases":
* Create a new Squeak project, name it, save it into a common repository (directory, svn, ...)
* Open an existing project, change it, save it back to the repository with exactly the same name (but a new revision in a local folder e.g. Squeaklets).
* Drag'n'drop project X into project Y (I'll see a thumbnail of X as a ProjectViewMorph) and then save project Y. Later open a fresh image, load project Y, click on the thumbnail -- successfully have project X loaded from disk (preferably looking in a location relative to the parent project Y or the image).
Overall I'd like to have a directory structure something like:
Activities/ MainMenu.pr Math/ MathMenu.pr Adding.pr Subtracting.pr English/ EnglishMenu.pr Vocabulary.pr Pronunciation.pr
Does this sound reasonable? Can someone please spell out in painful detail how it's done?
I'm trying to assemble a bunch of projects into a consistent menu tree -- basically to rebuild our old E-paati from a collection of separate project files instead of loading all the projects into the image.
I've spent most of the weekend studying, hacking, unhacking, rehacking, unhacking, etc Project/ProjectViewMorph/DiskProxy/ProjectLoading and I'm not ashamed to say that I need help. :-)
Cheers! -Luke
Luke Gorrie wrote:
Howdy!
I'd like some tips on how to develop a collection of linked Squeak projects, much like the standard ones distributed with the XO image.
Here're my imagined "use cases":
- Create a new Squeak project, name it, save it into a common
repository (directory, svn, ...)
- Open an existing project, change it, save it back to the repository
with exactly the same name (but a new revision in a local folder e.g. Squeaklets).
- Drag'n'drop project X into project Y (I'll see a thumbnail of X as a
ProjectViewMorph) and then save project Y. Later open a fresh image, load project Y, click on the thumbnail -- successfully have project X loaded from disk (preferably looking in a location relative to the parent project Y or the image).
Overall I'd like to have a directory structure something like:
Activities/ MainMenu.pr Math/ MathMenu.pr Adding.pr Subtracting.pr English/ EnglishMenu.pr Vocabulary.pr Pronunciation.pr
Does this sound reasonable? Can someone please spell out in painful detail how it's done?
I'm trying to assemble a bunch of projects into a consistent menu tree -- basically to rebuild our old E-paati from a collection of separate project files instead of loading all the projects into the image.
I've spent most of the weekend studying, hacking, unhacking, rehacking, unhacking, etc Project/ProjectViewMorph/DiskProxy/ProjectLoading and I'm not ashamed to say that I need help. :-)
Cheers! -Luke _______________________________________________ Etoys mailing list Etoys@lists.laptop.org http://lists.laptop.org/listinfo/etoys
ThreadNavigationMorph (which could use a facelift) let you jump from project to project. You can drag and drop ProjectViewMorphs on each other to crate hierarchies. There is also ProjectHistoryMorph that is more like a list of projects than a project history.
Karl
Karl
That is not solely obvious, for sure.
If you look at the Gallery project in the Etoys image, you see thumbnails of projects. They hare actually hand-edited (i.e., I opened the inspector for them) and #constructorSelector of DiskProxy is changed to '#namedExample:'. Upon loading, DiskProxy>>enter:revert:saveForRevert: is called and the actual project is brought in (via #fromExampleEtoys:). One below from that choice, another choice #namedUrl: is there to fetch a project from an HTTP server.
The way you created the thumbnails are almost right. You can load the root project, and hand-edit the thumbnails' DiskProxy (its selectors and arguments) and save the image again.
For the back end, SuperSwiki2 should work without changing the image side, or simply setting up a WebDAV folder would work. Adding a new server to the image is a bit tricky... I'm happy to write a little how-to if you need it. (Well, because you can hack, I'm not giving away all secrets^^;)
-- Yoshiki
At Sun, 25 Nov 2007 19:44:14 +0545, Luke Gorrie wrote:
Howdy!
I'd like some tips on how to develop a collection of linked Squeak projects, much like the standard ones distributed with the XO image.
Here're my imagined "use cases":
- Create a new Squeak project, name it, save it into a common
repository (directory, svn, ...)
- Open an existing project, change it, save it back to the repository
with exactly the same name (but a new revision in a local folder e.g. Squeaklets).
- Drag'n'drop project X into project Y (I'll see a thumbnail of X as a
ProjectViewMorph) and then save project Y. Later open a fresh image, load project Y, click on the thumbnail -- successfully have project X loaded from disk (preferably looking in a location relative to the parent project Y or the image).
Overall I'd like to have a directory structure something like:
Activities/ MainMenu.pr Math/ MathMenu.pr Adding.pr Subtracting.pr English/ EnglishMenu.pr Vocabulary.pr Pronunciation.pr
Does this sound reasonable? Can someone please spell out in painful detail how it's done?
I'm trying to assemble a bunch of projects into a consistent menu tree -- basically to rebuild our old E-paati from a collection of separate project files instead of loading all the projects into the image.
I've spent most of the weekend studying, hacking, unhacking, rehacking, unhacking, etc Project/ProjectViewMorph/DiskProxy/ProjectLoading and I'm not ashamed to say that I need help. :-)
Cheers! -Luke _______________________________________________ Etoys mailing list Etoys@lists.laptop.org http://lists.laptop.org/listinfo/etoys
On 27/11/2007, Yoshiki Ohshima yoshiki@vpri.org wrote:
That is not solely obvious, for sure.
If you look at the Gallery project in the Etoys image, you see thumbnails of projects. They hare actually hand-edited (i.e., I opened the inspector for them) and #constructorSelector of DiskProxy is changed to '#namedExample:'.
Aha!
One of the hacks I did was to add a new #constructorSelector called #fromUnderImage: that would recursively search for a rightly-named project file under (Smalltalk imagePath) -- then I was going to automatically use this constructor for projects saved into a directory that's under the image. But I rolled this back for being (a) too "magic" and (b) serializing out DiskProxy objects that're incompatible with the standard image (i.e. using undefined constructorSelector).
My next idea was just to hack more DWIM into the default #namedUrl: constructorMethod but for some reason I decided against that too.
I was wondering particularly about the saving part though. I like the idea of saving intermediate working copies in Squeaklets/ but then I want a 'publish' button that would upload a project into a common repository (svn or maybe webdav - I've never used webdav) and in that case it could be nice to use a standardised filename (i.e. without serial number). But it's at this point I decided I was probably reinventing the wheel and decided to ask for more detail about what other people do.
The way you created the thumbnails are almost right. You can load the root project, and hand-edit the thumbnails' DiskProxy (its selectors and arguments) and save the image again.
This is another time when I'd really like some kind of MagicWandMorph. I picture that clicking on the MagicWandMorph would pop up a dialogue box with some template text like '[:morph | ]' and let you type in the contents of a block -- then you'd get a special Hand that applied the block to each morph you clicked on. Or perhaps the UI could be different -- e.g. an extra halo item to apply MagicWand>>doIt: to the morph.
Is there something like this? Today I'm clicking a lot to open inspectors via halos and then copy&paste commands from one to the next. Hurts my Emacs-user pride when someone is looking over my shoulder :-)
For the back end, SuperSwiki2 should work without changing the image side, or simply setting up a WebDAV folder would work. Adding a new server to the image is a bit tricky... I'm happy to write a little how-to if you need it. (Well, because you can hack, I'm not giving away all secrets^^;)
I would really appreciate a hint! And I have only a loose idea of what WebDAV is.
Thanks! -Luke
Luke,
I was wondering particularly about the saving part though. I like the idea of saving intermediate working copies in Squeaklets/ but then I want a 'publish' button that would upload a project into a common repository (svn or maybe webdav - I've never used webdav) and in that case it could be nice to use a standardised filename (i.e. without serial number). But it's at this point I decided I was probably reinventing the wheel and decided to ask for more detail about what other people do.
Hmm, what kind of problems that the serial number would cause? Yeah, you might want to delete the older versions, but always looking at the latest version based on the serial number would work ok.
The way you created the thumbnails are almost right. You can load the root project, and hand-edit the thumbnails' DiskProxy (its selectors and arguments) and save the image again.
This is another time when I'd really like some kind of MagicWandMorph. I picture that clicking on the MagicWandMorph would pop up a dialogue box with some template text like '[:morph | ]' and let you type in the contents of a block -- then you'd get a special Hand that applied the block to each morph you clicked on. Or perhaps the UI could be different -- e.g. an extra halo item to apply MagicWand>>doIt: to the morph.
Is there something like this? Today I'm clicking a lot to open inspectors via halos and then copy&paste commands from one to the next. Hurts my Emacs-user pride when someone is looking over my shoulder :-)
As far as I know, no, and it would be a cute feature (could be a bit tricky to implement, as the mouse-click recipients behavior will change... You can do:
World allMorphsDo: [:m | (m isKindOf: ...) ifTrue: [...]]
too, as you know.
Yes, I have been a Emacs-user and sometimes it felt awkward to use a pointing device to write a program when I started.
For the back end, SuperSwiki2 should work without changing the image side, or simply setting up a WebDAV folder would work. Adding a new server to the image is a bit tricky... I'm happy to write a little how-to if you need it. (Well, because you can hack, I'm not giving away all secrets^^;)
I would really appreciate a hint! And I have only a loose idea of what WebDAV is.
WebDAV is a "network folder" in Windows terminology and can store and read files on a server over HTTP. Set up Apache and add several lines to httpd.conf to have one, or on Windows, a "Web folder" is a WebDAV folder and it should be visible from Etoys.
-- Yoshiki
Yoshiki Ohshima wrote:
Luke,
I was wondering particularly about the saving part though. I like the idea of saving intermediate working copies in Squeaklets/ but then I want a 'publish' button that would upload a project into a common repository (svn or maybe webdav - I've never used webdav) and in that case it could be nice to use a standardised filename (i.e. without serial number). But it's at this point I decided I was probably reinventing the wheel and decided to ask for more detail about what other people do.
Hmm, what kind of problems that the serial number would cause? Yeah, you might want to delete the older versions, but always looking at the latest version based on the serial number would work ok.
The way you created the thumbnails are almost right. You can load the root project, and hand-edit the thumbnails' DiskProxy (its selectors and arguments) and save the image again.
This is another time when I'd really like some kind of MagicWandMorph. I picture that clicking on the MagicWandMorph would pop up a dialogue box with some template text like '[:morph | ]' and let you type in the contents of a block -- then you'd get a special Hand that applied the block to each morph you clicked on. Or perhaps the UI could be different -- e.g. an extra halo item to apply MagicWand>>doIt: to the morph.
Is there something like this? Today I'm clicking a lot to open inspectors via halos and then copy&paste commands from one to the next. Hurts my Emacs-user pride when someone is looking over my shoulder :-)
As far as I know, no, and it would be a cute feature (could be a bit tricky to implement, as the mouse-click recipients behavior will change... You can do:
World allMorphsDo: [:m | (m isKindOf: ...) ifTrue: [...]]
too, as you know.
Yes, I have been a Emacs-user and sometimes it felt awkward to use a pointing device to write a program when I started.
There is the MorphicWrappers that let you type directly to the object: click on the object, a balloon pops up and start telling the object what to do . BotsInc have a version of MorphicWrappers. Karl
On 28/11/2007, Yoshiki Ohshima yoshiki@vpri.org wrote:
Hmm, what kind of problems that the serial number would cause? Yeah, you might want to delete the older versions, but always looking at the latest version based on the serial number would work ok.
I'm thinking that if we store our projects in a subversion repository then the checkout size would be unnecessarily large if we include all past versions of each project as separate files. You have subversion behind your webdav folder somehow, right? Or do you simply use 'cp' to rename the project files before commit?
Luke,
Hmm, what kind of problems that the serial number would cause? Yeah, you might want to delete the older versions, but always looking at the latest version based on the serial number would work ok.
I'm thinking that if we store our projects in a subversion repository then the checkout size would be unnecessarily large if we include all past versions of each project as separate files. You have subversion behind your webdav folder somehow, right? Or do you simply use 'cp' to rename the project files before commit?
Behind a WebDAV folder via Apache, you can choose to have or not to have subversion. Yes, because these are binary files, versioning is a bit costly (though 1GB disk space is a dollar is you can store 1000's of projects).
By default, uploading from Etoys just keep all the older version. It is conceivable to use the same name (by removing the serial number) and over write older version.
-- Yoshiki
etoys-dev@lists.squeakfoundation.org