You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Gerd

Unregistered

1

Tuesday, January 18th 2005, 1:59pm

singleton config and my problems with it ...

Hi all,

I followed the documentation on
http://www.kdevelop.org/3.0/doc/tutorial_settings/ to write an kde
application with a singleton config object. It's a kicker applet and now
I want to use it twice with different configurations. But it looks to me
that the applets are runing with the same config object. How can this be
or better how can I prefent them to use the same heap/stack or however
they share the config? Is there any documentation about this? I would
like to learn the technik behind.

Thank you very much

Gerd

Thomas

Beginner

Posts: 4

Location: Socorro, New Mexico, USA

Occupation: Software Engineer

  • Send private message

2

Tuesday, January 18th 2005, 5:59pm

RE: singleton config and my problems with it ...

Alas, you missed the point of singletons. Their only and main advantage is to have ever only one instance of them. I don't know the KDE stuff but a usual singleton cannot deal with different configurations. It is the single(ton) instance.

I'll give an example: think of some hardware, e.g. different possible CCD cameras which could be connected to a computer. Only one camera can (usually) be handled at a time because the downloading, displaying etc. of images is time and memory consuming. Then a singleton CCD camera object would be the way to do it.
There are 10 types of people in the world. Those that understand binary numbers and those that don't.

3

Monday, February 7th 2005, 12:47am

Yes, but if they're seperate kicker applets it would seem odd that they would use the same objects.