4.4.3 Packages

Q How do I create a SqueakSource project?
  1. go to squeaksource.com
  2. register yourself as a new member
  3. register a project (name = category)
  4. copy the Registration code snippet
  5. open>Monticello browser
  6. +Package to add the category
  7. Select the package
  8. +Repository>HTTP
  9. paste and accept the Registration code snippet; enter your password
  10. Save to save the first version
Q How do I load a Squeaksource project?
  1. Find the project in squeaksource
  2. Copy the Registration code snippet
  3. open>Monticello browser
  4. +Repository>HTTP
  5. paste and accept the Registration code snippet; enter your password
  6. select the new repository and Open it
  7. Select and load the latest version
Q How do I programmatically load projects from SqueakSource?
| mc fileToLoad version |
mc := Smalltalk at: #MCHttpRepository
ifPresent: [:repoClass |
repoClass location: 'www.squeaksource.com/Installer'
user: 'squeak' password: 'squeak'].
fileToLoad := mc readableFileNames
ifNone: [ nil ].
version := mc versionFromFileNamed: fileToLoad.
version workingCopy repositoryGroup addRepository: mc.
mc creationTemplate: mc asCreationTemplate.
version load.


A Run: ScriptLoader new installingUniverse
Q How do I define extension methods?


Q How do I run Code critics on a package?
  1. Start a pharo-dev image with the latest refactoring Browser code in it.
  2. Select your package in the OB class or package browser.
  3. Select open environment > package [opens a package browser]
  4. Select open > Code Critics


| pkg |
pkg := PackageInfo named: 'Saphir'.
pkg methods collect: [:method |
	method actualClass organization
		classify: method methodSymbol
		under: #'*coral' ]

User Contributed Notes

renggli (20 December 2011, 10:37 am)

The answer to "How do I programmatically load projects from SqueakSource?" is outdated since Pharo 1.1. More concise is:


Gofer new

       squeaksource: 'DaliotsPlayground';

       package: 'Ameba';


Add a Note
