[Etoys] bulk project cleanups
Yoshiki Ohshima
yoshiki at vpri.org
Fri Jun 19 02:35:21 EDT 2009
At Fri, 19 Jun 2009 05:38:44 +0530,
K. K. Subramaniam wrote:
>
> On Friday 19 June 2009 03:44:07 am Yoshiki Ohshima wrote:
> > > > for each project blah in a defaultDirectory.
> > > ProjectLoading loadFromDir: .......
> > > In this project.
> > > run commands
> > > storeOnServerWithNoInteraction
> > > delete project.
> >
> > I think you got the basics right. I think that QuickGuideMorph
> > class>>convertProjectsWithBooksToSISSIn:to: does somewhat similar.
> > ChangeSet>>clear clears it up, and instead of saving to something
> > else, it have to be saved as a project. The last part may be a bit
> > tricky.
> Thanks Yoshiki. I did look into your armLengthCommand and QuickGuideMorph
> methods. Very neat. QCG only reads project files. I got so far:
> | dir p |
> dir := FileDirectory default
> dir fileNamesMatching: '*.pr' do: [ :f |
> p = ProjectLoading loadName: f stream: (dir readOnlyFileNamed: f)
> fromDirectory: dir withProjectView: nil.
> "In project p, do"
> create new changeset and make it current.
> ReleaseBuilder new cleanUpChanges.
> p okToChangeSilently; storeOnServerWithNoInteraction.
> p delete.
>
> The part I am stuck is in "in project p, do". How can I send messages in a
> project context without entering it? I need the reverse of armsLengthCommand.
> Instead of running commands post exit, I need to run commands on entry.
This may be a bit different approach you are taking, but try
attached change set. File it into a project (let us call it the root
project), and evaluate:
Smalltalk at: #RootProjectName put: Project current name
and then load any project. It clears the changeset of it, and save
and comes back to the root project.
Upon entering the root project, a new UI process is started so you
cannot be in a loop to iterate over files. You need to add similar
technique in the finalEnterActions to iterate over the files.
-- Yoshiki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProjectSaveAndComeBack.3.cs
Type: application/octet-stream
Size: 3922 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/etoys/attachments/20090618/940604b3/attachment.obj
More information about the Etoys
mailing list