using a factory to control instances
- From: Jacob Perkins <jap1 users sourceforge net>
- To: gnome-components-list gnome org
- Subject: using a factory to control instances
- Date: 23 Apr 2003 23:12:39 -0500
I want to use a bonobo factory for creating controls (or any
BonoboObject). I already have a setup working that was basically copied
from the sample control in libbonoboui. However, I only want one
instance of this control. So, given 'moniker', I want to create a new
BonoboObject if it doesn't exist yet, or return the already created one.
However, if given 'moniker:new', I want to create a new instance of the
object. Since there are no guarentees as to which process will request
the first instance, how do I do this. To make it simple, how would one
modify the sample control to support this?
I know this can be done with a static variable or object, but it seems
that factories should provide a better way to do this.
Thanks
--
Jacob Perkins <jap1 users sourceforge net>
seahorse
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]