[Gambas-user] Single instance application, anyone else done it?

John Dovey dovey.john at gmail.com
Thu Jul 8 16:39:26 CEST 2021


Just to throw a spammer in the works, what about those of us who run
everything throw X windows and don’t have a desktop at all?

On Thu, Jul 8, 2021 at 9:38 AM Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 08/07/2021 à 15:56, Bruce Steers a écrit :
> >
> > Nope it does not work using DBus.Session.Applications.Exist() , it works
> > if one app is ready loaded but launching 2 apps together fails to
> > connect for the second but Applications[] is not yet updated.
> >
> > seems all i can do is test error.Text ends with "already registered" (im
> > not sure if gambas translates that msg)
> >
> > Another option on a gambas level is to edit the DBus.class gb.dbus and
> > add a boolean property "ApplicationExists" that gets set to true if the
> > connection fails due to already existing interface during
> > _RegisterApplication()
> >
> > Or if Error.Code could be something other than -1 if connection exists?
> >
> > then i can tell if error was because connection exists or something else.
> >
> > BruceS
> >
>
> Error messages are never translated (otherwise it's a bug).
>
> But of course this is a temporary workaround, and a solution like you
> suggest must be implemented.
>
> Regards,
>
> --
> Benoît Minisini
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-- 
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210708/d9f0fa0b/attachment.htm>


More information about the User mailing list