manuallly controlling dependencies, at least for SAR
goran.hultgren at bluefish.se
goran.hultgren at bluefish.se
Thu Nov 28 07:51:52 UTC 2002
"Jeff Sparkes" <jsparkes at databeacon.com> wrote:
> > From: goran.hultgren at bluefish.se [mailto:goran.hultgren at bluefish.se]
> > This one is a fixed bug not yet released. Change this method to be:
> >
> > cardWithNameBeginning: aString
> > ...and then try again! Or make sure to only use lower case without
> > spaces (don't need the full name though) in the search like this:
> >
> > SMSqueakMap default installPackageNamed: 'win32nativefonts'
>
> That did the trick. You have to expect that people will want to use the
> literal name from the package loader display. Perhaps you shouldn't have
> allowed space in names, but I wasn't the first to do it. The refactoring browser was already there. :-)
This is because this particular method (cardWithNameBeginning:) was
implemented first for the web frontend where you can type:
http://map2.squeakfoundation.org/sm/packagebyname/win32
...and it works. So there is a reason for everything. :-)
> In the branch of this thread, you want us to use "load scripts" . I still
> think that the require: method is at least semantically useful to show why you're loading another package. Here's a working version, but not as a
> change set which might lead someone to actually use it.
>
> require: packageName
> "Install a package if it's not already installed."
> | card |
> card _ DefaultMap cardWithName: packageName.
> (DefaultMap installedPackages includes: card)
> ifFalse: [(self confirm: 'Install required package ' , packageName , ' first?')
> and: [DefaultMap installPackageNamed: card name]]
Ok, this method would be useful of course from a "load script", no doubt
about that. But on the other hand "load scripts" are a bit "useless"
until we have package releases IMHO. But sure, they work.
And in that case I would probably not ask the user unless he has turned
on some Preference for that.
Again - I know that I am repeating myself - I hope you understand why I
don't want this kind of code inside any preambles. Because then I can't
install the package without the prerequisites. And that is bad. I
chatted with Avi the other day and perhaps we could use a convention to
make the code in the preambles be optionally used if SqueakMap wants to
like:
SMSqueakMap default useDefaultLoadScript: [
...and here goes your default prereq load script...
]
This would mean that package maintainers can include a load script
inside the package but it can be disabled from SqueakMap if the user
doesn't want to use it (because he/she knows better) or because we have
introduced some other mechanism for dealing with dependencies.
Ok, I will include this mechanism in the next maintenance release of SM,
it is a harmless thing anyway.
regards, Göran
More information about the Squeak-dev
mailing list
|