Hi,
Martin Dias wrote:
> About Fuel ... Hopefully we might be capable of doing that in some months...
> at the moment you can find some limitations, especially if you were using
> DiskProxy (do you?).
I am not sure if I use DiskProxy. Since I was constrained to use an
oldish 3.9 image, I had to find what worked through some experiments.
What I use now (maybe that looks ugly these days, but works the way I need):
To save the current status of the application:
"---------------------------------------------------------------------------------------------------------------------"
Project current storeOnServerInnards.
"---------------------------------------------------------------------------------------------------------------------"
This bypasses the dialog that asks for saved project file name and
location, and just saves a new version of project file in the
directory of the image file, and in the Squeaklets directory
underneath.
Versioning is important for me because if something goes wrong during
the saving of a project I can simply load a previous version manually.
To load the last saved version of the project with given name:
"---------------------------------------------------------------------------------------------------------------------"
loadProject: aString
"load a project from a file whose name is like XXX.nnn.pr from the
default
directory where XXX are letters, and nnn are numbers. A project with
the
highest version will be loaded"
| files dir |
dir := FileDirectory default.
files := (dir fileNames select: [ :fn | | prts |
prts := fn findBetweenSubStrs: '.'.
((prts size = 3) and: [(prts at: 1) = aString & (prts at: 3) =
'pr'] ).
]) asOrderedCollection sort: [ :e1 :e2 | | en1 en2 |
en1 := (e1 findBetweenSubStrs: '.') at: 2.
en2 := (e2 findBetweenSubStrs: '.') at: 2.
(en1 asInteger) > (en2 asInteger).
].
^files ifNotEmpty: [
ProjectLoading openFromDirectory: dir andFileName: (files at:
1).
Smalltalk garbageCollect.
] ifEmpty: [ nil ].
"---------------------------------------------------------------------------------------------------------------------"
so that's ProjectLoading openFromDirectory:andFileName:
I am not saving any code, only data. But if Fuel provided a way to
overlay application-specific code over the generic image, this way of
binary deployment would be very convenient.
Especially given the tablet's CPU is very slow, loading large mcz's
from Monticello repos and compiling them may take terrible time.
Thanks.
PS Saving methods did not work in the old Squeak image anyway... Even on a PC.
--
Dimitry Golubovsky
Anywhere on the Web