freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] FreeRIDE startup


From: Horacio Lopez
Subject: [FR-devel] FreeRIDE startup
Date: Sun, 27 Jan 2002 06:50:59 -0300

I am creating a plug-in for I18N, and I am testing on
both  Linux and Windows.
I am running exactly the same program, still,
the initialization order of the plug-ins is different.
 
This is because the load_plugins method
iterates the directory entries without sorting
them in any particular order.
 
Just to let people know they shouldn't
always rely on the start-up order in a particular
system, it may not necesarily always follow
the same initialization order in other systems.
 
Now some comments on this:
Some plug-ins will be using the Language plug-in
for internationalization, and each one of them
will have to wait until Language loads.
Each plug-in coder will have to code his own
initialization method.
Would it make sense to store this synchronization
data in the plugin.xml files ?
say for example:
 
<plugin name="Test2_Plugin" version="1.0">
 
  <waitfor plugin="I18N_Lang" />  
 
  <startafter plugin="Test1_plugin" />
 
  <require>plugins/test2/test</require>
  <module>FreeRIDE::Plugins::Test2</module>
  <properties>plugins/test2/properties.xml</properties>
  <install>plugins/test2/installer</install>
  <uninstall>plugins/test2/uninstaller</uninstall>
</plugin>
 
Explanation:
The <waitfor> label waits for an initialization message
from the specified plug-in. That doesn't necesarily means
that plug-in has fully completed its initialization stage.
The <startafter> makes this plug-in to start its initialization
once the specified plug-in has fully completed its initialization.
(maybe it's not all that clear, but we can talk more about it
later if you find this feature to be useful)
 
This would help us avoid initialization mistakes
and duplication of code. Don't know if it's feasible, and
don't know if this makes things harder, just an idea.
 
If you like it, I will add it to the Wiki wishlists.
 
cheers,
                 vruz
 
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]