freeride-devel
[Top][All Lists]
Advanced

[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: Fri, 28 Jun 2002 12:03:11 -0400

> <SNIP>
> 
> The reason for that is because at that point and eventhough
> AppFrameRenderFox has already started none of the FOX resources have
> been properly initialized (there is no Main Window initialized)
> so the MenuPaneRenderFox does its job thinking that is everything is
> already running ok but what "RUNNING" says for now is only that we
have
> entered the start method note the initialization is finished.
> 
> So I think there is something wrong in the design here. I see several
> expelnations:
> 
> a) the semantic of the "RUNNING" state is not good in the sense that
> this is not because a plugin is in a running state that it is ready to
> work. may be we should introduce another transient state like
> "INITIALIZING" that woudl eventually become "RUNNING" once the
> initialization has completed
> 
> b) Another problem is that the RUNNING state is associated with the
> **Class** method start and what we care about is the state of the
> instances of that plugin.
> 
> c) we could ask the plugin to the running state later in the process.
> Instead of transitioning in the start method we could transition at
the
> end of the initialize method. But then it becomes an action that we do
> in an instance method and I don;t know what are the implications of
this.
> 
> I'm open to discussion here because I really think that something is
> flawed in the way we use the state transitions in the plugin but I
don;t
> yet see how to fix it in the proper way.
> 
> laurent
> 
> --
> Laurent JULLIARD - Xerox R&T/SSTC/XPA - Open Source team
>  >> Host your Xerox Software project on CodeX: http://codex.xerox.com
>  >> address@hidden community: http://xww.linux.world.xerox.com

Well, the point of transitions is to identify the state of a plugin to
other plugins.  If you plugin in not in the RUNNING state after .start
is called, then you SHOULD NOT say it is.  If it's after your class gets
initialized, then that is when you should transition your plugin.
Remember, the plugin is passed into the constructor to allow the class
instance to do necessary things to the plugin instance.  The fact that
we (normally) transition immediately does not mean this is the correct
behavior for all plugins.  

So, I would say to move the transition code to the point where the
actual state of the plugin IS in the state you are reporting (in this
instance...RUNNING).

-Rich




reply via email to

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