Re: Querying oaf of the interfaces a component implements ?



On Tue, 17 Oct 2000 rodrigo linuxave net wrote:

> ok, here's what I'm trying to do. I've got a window which shows a list of all the
> components of my application, and I want to let the user activate/deactivate
> them. So, first of all, I need to know if the component is running or not to add
> the corresponding icon next to it (one for activated and another one for
> not-activated).
> 
> Then, if possible, I want to let the user start/stop those components. BTW, those
> components are GenericFactory's.
> 
> It is a sort of goad-browser, but for only my components.

OK, as long as you are aware of the race condition inherent in utilizing
the information on whether the component is active, I'll try to explain
how I would do it:

	list = oaf_query("is_rodrigos_component = true");
	active_list = oaf_query("is_rodrigos_component = true and _active = true");
And then use active_list to go through the list and mark things as active.

Right now, I don't think the OAF_ServerInfo returned from oafd includes
the _active field in its list of attributes. Whether or not calculated
fields like that should be included is up for debate.

-- Elliot
DEAR IRS, I know you got my unsubscribe request. please stop sending me
all this junk mail and asking me to work half the year for you.






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