[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [FR-devel] Problem with RUNNING state
From: |
Rich Kilmer |
Subject: |
RE: [FR-devel] Problem with RUNNING state |
Date: |
Wed, 26 Jun 2002 12:21:36 -0400 |
> -----Original Message-----
> From: address@hidden [mailto:freeride-
> address@hidden On Behalf Of Laurent Julliard
> Sent: Wednesday, June 26, 2002 11:13 AM
> To: address@hidden
> Subject: Re: [FR-devel] Problem with RUNNING state
>
> Rich Kilmer wrote:
> > Response is at the bottom of this message.
>
> >>
> >>[RICH -- we can make a plugin be dependent on a subsystems, right?]
> >
> >
> > Right now a subsystem is just a collection that has no manifestation
in
> > the plugin architecture. It literally is just a holder of many
plugins
> > that each get loaded and was put in place to simplify grouping
plugin
> > xml data. Because of this you cannot be dependent on it.
> >
> > Thus (Curt) when you specify:
> >
> > <subsystem name="GuiRenderFox">
> >
> > the name is ignored.
> >
> > So here is the idea. Register the subsystem as a plugin using the
> > StandardPlugin module as its mixin (and REQUIRE a name be supplied).
>
> Rich,
>
> I'm a bit lost (or tired or both :-) ). Could you be more precise on
how
> to register the susbsystem as a plugin? What do you mean exactly by
"and
> REQUIRE a name be supplied".
>
> Would you be willing to provide some sample code here? That would
help...
>
__example xml__
<subsystem name="GuiCore">
<plugin name="GuiSetup" version="1.0" autoload="true">
<require>plugins/System_GuiCore/GuiSetup</require>
<module>FreeRIDE::GuiSetup</module>
<properties>properties/GuiCore/GuiSetup.xml</properties>
<dependency state="LOADED" action="start">
<when plugin="Logger" version="*" state="RUNNING"/>
<when plugin="AppFrames" version="*" state="RUNNING"/>
<when plugin="MenuBars" version="*" state="RUNNING"/>
<when plugin="MenuPanes" version="*" state="RUNNING"/>
<when plugin="EditPanes" version="*" state="RUNNING"/>
</dependency>
</plugin>
<plugin name="AppFrames" version="1.0" autoload="true">
<require>plugins/System_GuiCore/AppFrames</require>
<module>FreeRIDE::AppFrame</module>
<properties>properties/GuiCore/AppFrames.xml</properties>
<dependency state="LOADED" action="start">
<when plugin="Logger" version="*" state="RUNNING"/>
</dependency>
</plugin>
<plugin name="MenuBars" version="1.0" autoload="true">
<require>plugins/System_GuiCore/MenuBars</require>
<module>FreeRIDE::MenuBar</module>
<properties>properties/GuiCore/MenuBars.xml</properties>
<dependency state="LOADED" action="start">
<when plugin="Logger" version="*" state="RUNNING"/>
</dependency>
</plugin>
<plugin name="MenuPanes" version="1.0" autoload="true">
<require>plugins/System_GuiCore/MenuPanes</require>
<module>FreeRIDE::MenuPane</module>
<properties>properties/GuiCore/MenuPanes.xml</properties>
<dependency state="LOADED" action="start">
<when plugin="System_Commands" version="*" state="RUNNING"/>
</dependency>
</plugin>
<plugin name="EditPanes" version="1.0" autoload="true">
<require>plugins/System_GuiCore/EditPanes</require>
<module>FreeRIDE::EditPane</module>
<properties>properties/GuiCore/EditPanes.xml</properties>
<dependency state="LOADED" action="start">
<when plugin="Logger" version="*" state="RUNNING"/>
</dependency>
</plugin>
</subsystem>
__END EXAMPLE__
In this example, the subsystem tag <subsystem name="GuiCore"> is just a
holder of multiple <plugin> tags. When core.rb parses this file it
merely iterates over the contained <plugin> tags and creates them. The
subsystem is not represented in the running FreeBASE system and the name
is ignored. What I propose is that when the core.rb file reads in an
xml file that contains a <subsystem name="..."> tag it creates a plugin
(just like the <plugin> tag does) that is named as specified (GuiCore)
and has a dependency of all the plugins within it. It would be like
doing this:
<plugin name="GuiCore" version="1.0" autoload="true">
<module>FreeBASE::SubsystemPlugin</module>
<dependency state="LOADED" action="start">
<when plugin="GuiSetup" version="*" state="RUNNING"/>
<when plugin="AppFrames" version="*" state="RUNNING"/>
<when plugin="MenuBars" version="*" state="RUNNING"/>
<when plugin="MenuPanes" version="*" state="RUNNING"/>
<when plugin="EditPanes" version="*" state="RUNNING"/>
</dependency>
</plugin>
This would allow something that depends on this entire subsystem to be
dependant on it instead of its components.
<plugin name="FooPlugin" version="1.0" autoload="true">
<require>...</require>
<module>...</module>
<dependency state="LOADED" action="start">
<when plugin="GuiCore" version="*" state="RUNNING"/>
</dependency>
</plugin>
Does this make sense?
-Rich
Re: [FR-devel] Problem with RUNNING state, Laurent Julliard, 2002/06/28
RE: [FR-devel] Problem with RUNNING state, Curt Hibbs, 2002/06/28
Re: [FR-devel] Problem with RUNNING state, Laurent Julliard, 2002/06/28