MC scripts (was: #initialize and MC)

Philippe Marschall philippe.marschall at gmail.com
Sun Sep 17 12:56:35 UTC 2006


2006/9/17, Diego Fernandez <diegof79 at gmail.com>:
> I've the same problem with the autocategorizer...
> I'm using #initialize but I think that the correct place should be
> some "loading" method related to the package. (like
> Application>>loaded in VAST).
>
> I'm pretty new to MC, what is the correct way to do that.

IIRC:
SomeClass class >> #postload

> In the Monticello Browser there is an "add postscript" but it doesn't
> work, there is any way to fix that? Can I add those scripts "by hand"?

You need a matching PackageInfo version. You can try those from impara
but they are quite likely only for 3.8.

Philippe

> Regards,
> Diego.-
>
> PS: Damien, maybe you can refactor this in something like:
> initialize
>      (DPPreferenceInstaller for: self) value
>
> So you can avoid a lot of copy&paste without subclassification
>
> On 9/16/06, Damien Cassou <damien.cassou at laposte.net> wrote:
> > Alejandro F. Reimondo a écrit :
> > > Damien,
> > > Please revise why you need to initialize the class...
> >
> > Each subclass sets a new preference in the preference browser.
> >
> > Current implementation is in the super class which is abstract:
> >
> > DPAbstract class>>initialize
> >   self isAbstract
> >     ifFalse:
> >       [Preferences
> >         addBooleanPreference: self preferenceName
> >                     category: #'dynamic protocols'
> >                      default: self defaultPreferenceValue
> >                  balloonHelp: 'Activates the dymamic protocol ',
> >                                 self name, '.'].
> >
> > DPAbstract class>>preferenceName
> >   ^ self name copyFrom: 3 to: self name size
> >
> > The preference name is taken from the name of the class without the
> > first two characters.
> >
> > Do you have another solution ?
> >
> >
> > --
> > Damien Cassou
> >
> >
> >
>
>



More information about the Squeak-dev mailing list