[FIX][ENH] FileListFixes2-nk

Ned Konz ned at bike-nomad.com
Wed Nov 27 15:58:19 UTC 2002


On Wednesday 27 November 2002 12:04 am, Stephane Ducasse wrote:
> One of the problem I got with the file list
> is that you would like to be able to:
>
>         - find a file containing a script that loads a bunch of
> other files - then parametrizing the script so that it uses the
> current location indicated by the file list
>         
> with that we could do really easily loading scripts for end users.
>
> I did not have the time to look at that but if somebody has a
> solution I'm interested.

The "file in" action of the file list could/should use the 
#fileInFor:announcing: method I put in the SARInstaller change set. 
This way the FileList itself could respond to messages like 
"fileInFromFileNamed:" and so on. That is, the fileInFor:announcing: 
sets up the context so that "self" is set to the first argument 
(which could be the FileList itself, or some installer object).

So you could have file-in scripts like:

self fileIn: 'xyz.st'.	"relative path"
self fileIn: 'abc/def.st'.

You'd run into the same problems I did with the SARInstaller, though, 
with differing pathname construction on multiple platforms. One 
suggestion I'd have for this is to use zip/unix like paths and 
translate to the local file system (again, look in SARInstaller).

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list