I published a new version of MooseChef with the trait installer. Which of course you need
to install the trait installer first :)
MCHttpRepository
location: 'http://www.squeaksource.com/TraitsApplication'
user: ''
password: ''
On 27 janv. 2011, at 17:48, Johan Fabry wrote:
On 27 Jan 2011, at 06:07, Simon Denier wrote:
On 27 janv. 2011, at 08:04, Tudor Girba wrote:
This will probably pose a problem in the future
because we won't be able to cleanly add these traits in the Famix-Extension package. I
am not knowledgeable enough in this issue to propose a solution. Does the trait installer
solve the problem?
yes
You simply need to be able to run some code when opening the tool, or do it as a
post-load action of the package.
The only downside is that it (of course) modifies the Monticello packages where you are
adding the traits, as you change the class def. So you need to remember to uninstall
before doing commits otherwise these modified class definitions are included.
Normally if you are extending a package, you just save the extension, not the package
being modified so there is no impact.
Monticello should really be changed such that you can do Traits as an extension as well
(and instvars as well would be nice). I talk about this in the Elsevier EST paper we
submitted this week as it would really help to make nicely modular extensions to Moose.
(As Simon is experiencing now as well ...)
Until Monticello can support extensions of class definition (instance variables, traits),
we also rely on the EntityState pattern to extend attributes.
The Trait installer seems like a good addition to the Moose distrib for those who use
traits.
--
Simon Denier