Hi,
I forgot to mention in my previous mail how to load refactoring
support (currently
refactoring tool support doesn't load by default):
Gofer it
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfMagritte3';
load.
ConfigurationOfMagritte3 project stableVersion load: 'Magritte-Pharo-Tools'
This will load refactoring support to move Magritte 1 or 2 described
objects to instance-side pragma descriptions.
It also loads deprecated code such as #description with redirects to
#magritteDescription with a deprecation warning.
-----
So that everything is the same place here are the porting guidelines I
posted previously:
1) search for all senders and implementors of #description in your code, if
they are magritte descriptions rename the selector from #description to
#magritteDescription
2) remove #magritteDynamic and remove the block around the method.
3) Use the refactoring support to move class-side descriptions to instance
side descriptions with pragmas - making sure that any accessors to class
side methods are either prefixed with ‘class’ or moved to the instance
side. If you move description help methods to instance side be careful if
they contain: 'context := PRCurrentContext value' as context will shadow an
instance variable of the same name so either replace context with 'self
context' and remove 'context := PRCurrentContext value' or rename context
say theContext and replace 'context := PRCurrentContext value' with
'theContext := self context'.
4) Remove any empty categories on the class side.
5) PRWidget derived classes should either by modified to be derived from
PRWidgetPropertyBase or keep derived from PRWidget but modify the accessors
to store state in instance variable rather than the property dictionary in
PRWidgetPropertyBase. See PRViewsWidget and PRSearchWidget for examples of
both types of port.
6) Modify structure initialisation with PRComponent to use prototype
instance rather than classes. So
(PRComponent named: 'contents')
componentClass: PRContentsWidget;
write: '%c' using: PRContentsWidget descriptionHeading;
yourself
becomes:
(PRComponent named: 'contents')
prototypeInstance: (PRContentsWidget new
heading: '%c';
yourself);
yourself
add setters to allow initial settings to be set on the prototype instances
again see PRViewsWidget and PRSearchWidget for examples.
7) Put a break point in Object>>description and Object class>>description
to trap any cases you’ve missed (the break-point should not be hit) and
check the add-on. Note Object>>#description and Object class>>#description
are only present if you load 'Magritte-Deprecated'
Hi,
I've completed an initial port of Pier to Magritte with pragma instance
side descriptions - now known as Magritte 3. The Pier port is now named
Pier 3.
In addition to base systems I've ported the following:
Magritte 3 ported addons:
--------
Magritte-Json
MAgritte-XMLBinding
Pier 3 ported addons:
-----
Pier-Admin
Pier-Blog
Pier-Book
Pier-Desihn
Pier-Documents
Pier-EditorEnh
Pier-FileUpload-*
Pier-Google
Pier-JQuery
Pier-Kernel-Distributions
Pier-LinkChecker
Pier-Shout
Pier-Wysiwyg
Pier-Exporter-Code
Pier-Randomizer
Pier-Setup
Pier-Twitter
Note I've moved the Pier-Blog and Pier-Book to the Pier 3 add-ons
repository (http://source.lukas-renggli.ch/pier3addons)
The repositories are:
http://source.lukas-renggli.ch/pier3http://source.lukas-renggli.ch/magritte3http://source.lukas-renggli.ch/magritte3addonshttp://source.lukas-renggli.ch/pier3addons
Note: I've deleted "Pier 2 unstable" and "Magritte 2 unstable" repositories
- all the code has migrated to the repositories above.
There are four supporting configurations:
ConfigurationOfMagritte3
ConfigurationOfMagritte3AddOns
ConfigurationOfPier3
ConfigurationOfPier3AddOns
Try it out with:
Gofer it
squeaksource: 'MetacelloRespository';
package: 'ConfigurationOfPier3AddOns';
load.
ConfigurationOfPier3AddOns project stableVersion load: 'Pier-Admin'
the above will pull in a significant portion of the add ons and core
libraries and give you a sense of how stable the code is.
Caveats:
----
All the tests are green, but I've only applied limited testing.
I've tested the above 'Pier-Admin' loading on a clean Pharo 1.3 image.
I've removed the Gemstone information from the configurations. I guess once
everything is stable on Pharo we can consider a Gemstone port.
Let me know how you get on
Nick