[Gambas-user] Mascot Code

Christopher Brian Jack brian at ...1334...
Sun Oct 15 23:47:50 CEST 2006


On Sun, 15 Oct 2006, Benoit Minisini wrote:

> What's the matter with recompiling the entire IDE?

It's akin to requiring recompiling of an entire kernel to upgrade or
create a single module.

> > Then have the IDE able to select one (or more) "mascot components" similar
> > to how a project can select its operating components (like gb.form, gb.db,
> > gb.net, etc.).

> > So his existing behaviors could be placed into something like
> > gb.mascot.animations and gb.mascot.reporterrors or somesuch.
>
> Components are used for sharing important code with different project. Why
> would you want to share the mascot?
>
> Or maybe you want to have a generic component for making mascots?

No more like a generic way to add functionality to the existing mascot.

> > I'm thinking this would require the mascot being reimplemented in a manner
> > similar to a form so that the plugins can be coded as event observers.
> > Of course there's the issue of propogating events past each plug-in, in
> > sequence, until one acts on the event.
> >
> > A standard infrastructure for adding items to a mascot-global context menu
> > would be required for plugins for such plug-ins as well.
>
> I don't understand. Can you explain exactly what you need? Or show some
> code? :-)

Say I want to add some context (right-click) functionality to the mascot.
Currently I'd have to intrude deep into the IDE code and recompile to make
it work.  Furthermore distributing such a change boils down to having to
redistribute the code to the entire IDE (with modifications).

Moving the mascot code into components would make making mascot
enhancement plugins more easily distributable (don't require packing up
the entire IDE to package the plug-in).

Most plugins will probably want to make use of a context (popup) menu so
the basic implementation for that should sit in the monolithic IDE code
and exports an interface for plugins to define any context menu items the
plugin requires.  The plugin would have an event handler called when one
of its context menu items was selected.  The IDE would keep an internal
table for which plugins use which context menu items so the appropriate
items may be removed if a plugin is subsequently made inactive.  Making
the animation a plugin would allow other plugins to call the animation
routines (namely to trigger the "yay-let's-go" or "oh, crap" animations).

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher





More information about the User mailing list