[squeak-dev] Metacello class >>#load ( was Re: unsupported projects
)
Torsten Bergmann
astares at gmx.de
Sat May 15 15:57:02 UTC 2010
#load typically loads the latest project version that is marked
with a #release blessing. It is optional to have these convenience
methods on the class side.
If #load is missing you can implement it like this:
load
"self load"
^self project latestVersion load
since typically one wants to quickly load the latest release version.
If you look in detail in ConfigurationOfScriptManager from
squeaksource/MetacelloRepository then you will notice that
evaluating
ConfigurationOfScriptManager project latestVersion
you will return version 1.1. although another version 1.2
exists. Guess why: the version 1.1 is marked as release by
setting the blessing to #release.
version11: spec
<version: '1.1' imports: #('1.0-baseline') >
spec for: #common do: [
spec blessing: #release.
...
while version 1.2 still is in development mode
version12: spec
<version: '1.2' imports: #('1.0-baseline') >
spec for: #common do: [
spec blessing: #development.
...
Independent from all that you can always follow the usual
pattern:
(ConfigurationOfXXX project version: 'vv.vv') load
to load a specific version - where vv.vv is the version noted in
the pragma (Metacello uses the pragmas and doesnt care about the
method name).
The other form you may have seem:
ConfigurationOfXXX load
is just a timesaver to get the latest version. It may be missing
since most configs are written by hand since still more tools for
Metacello are missing.
-----------------------------------------------------------
And by the way:
Installer
ss
project: 'MetacelloRepository';
install: 'ConfigurationOfExternalWebBrowser'.
(Smalltalk at: #ConfigurationOfExternalWebBrowser) load
is now working in Squeak too. It is the same as:
((Smalltalk at: #ConfigurationOfExternalWebBrowser) project version: '1.1') load
-----------------------------------------------------------
If you require a ConfigurationOfAppleScript we can create
one. Side note: a new book chapter on Metacello is in preparation
by Mariano, be patient or ask questions on the squeak/pharo list.
Have fun
T.
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the Squeak-dev
mailing list
|