On 31 July 2011 05:16, Nick Chen <[email protected]> wrote:
> Hi
>
> I have modified an existing class in the Smalltalk image and added an
> instance variable to it. I would like to record this change -- added this
> new instance variable -- in Monticello; that way my team can also pull in
> the changes and have it work. This existing class is outside of my
> Monticello package.
>
> Is this possible?
>
> I have tried following these two threads (~ 2008)
>
> *
> http://forum.world.st/monticello-package-adding-instance-variables-to-existing-classes-td110740.html
> *
> http://forum.world.st/squeak-dev-MC-unload-action-and-postload-actions-td78441.html
>
> by creating a method on the class side e.g. TheObject class>>mcInstallOn:
> aClassEditor but it does not seem to work.
>
> Is this functionality still supported or is there a new way to achieve this?
>
> Thanks!
>
As far as i can tell, this is not supported.
If you allow things like that, then system become very fragilie.

Suppose that you have two independently developed packages, which
adding instance variable to same external class
under same name.
Such kind of conflicts is impossible to solve, because you never know
what combination of package(s) could be loaded.

Instead, what you can do is to save own version of package (with class
where you added ivar) and distribute your code with
this version of package.

> --
> Nick
>
> --
> View this message in context: 
> http://forum.world.st/Adding-instance-variables-to-existing-classes-in-Monticello-tp3707174p3707174.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>



-- 
Best regards,
Igor Stasenko AKA sig.

Reply via email to