discuss-gnustep
[Top][All Lists]
Advanced

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

Detecting running application


From: Chris B. Vetter
Subject: Detecting running application
Date: Thu, 11 May 2006 10:14:44 +0200

Hi,

I'm looking for a way to detect whether a *bundle* is already loaded.

Point is, I'm working on a bundle that can either be loaded
automatically by adding it to GSAppKitUserBundles() OR implicitly from
an application through NSBundle -- but only once. If the bundle
detects another copy already loaded, it is supposed to quietly "exit."

I remember that back in the old days of GNUstep, when you launched an
application twice, you got an alert that the application is already
running. So I figured 'registering' the bundle with gdomap(? I think
that was how it was done back then) would do the trick. However, I
just launched SystemPreferences twice and no alert.. Uhm?

Does anyone on the list have an idea how I could solve my problem? The
easiest would probably be an entry to the user defaults that the
bundle already loaded. However if the application unexpectedly quits,
the entry wouldn't be removed. So that's not an option.

--
Chris




reply via email to

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