VMMaker stuff (was Re: plugin suffix)

David T. Lewis lewis at mail.msen.com
Fri May 11 01:19:37 UTC 2001


On Thu, May 10, 2001 at 02:57:54PM -0700, Tim Rowledge wrote:
>
> One item I haven't finished is a way to auto detect all the plugins that
> should be built. The ugly hack way that springs to mind like 'Frog
> Surprise' is to just stick a method #shouldBeBuilt in each plugin class,
> but somehow that seems just too ugly. Should I just give in to
> expedience? Surely not...

How about letting plugin classes register themselves with class VMMaker.
Then "VMMaker initialise" would set up its plugin registry to some
default for building a base Squeak system. Interested classes could
do "VMMaker addPlugin: self" to add themselves to the registry.
Then someone writing UnixOSProcessPlugin could add a #startUp method
that would do something like this:

startUp
  |vmMaker|
  Smalltalk platformName = 'unix'
    ifTrue:
      [vmMaker := Smalltalk at: #VMMaker ifAbsent: [].
      vmMaker ifNotNil: [vmMaker addPlugin: self]]

Instances of VMMaker would of course still be able to add and remove
plugin classes to taste, but the class side registry could set things
up with reasonable defaults.

Dave





More information about the Squeak-dev mailing list