[Gambas-user] Dbus registers wrong name?

Benoît Minisini g4mba5 at gmail.com
Tue Dec 21 18:57:37 CET 2021


Le 21/12/2021 à 18:47, Bruce Steers a écrit :
> 
> 
> On Tue, 21 Dec 2021 at 17:05, Cristiano Guadagnino <criguada at gmail.com 
> <mailto:criguada at gmail.com>> wrote:
> 
>     Il giorno mar 21 dic 2021 alle ore 17:56 Bruce Steers
>     <bsteers4 at gmail.com <mailto:bsteers4 at gmail.com>> ha scritto:
> 
>         1. you have not set DBus.Name
>         initialise like this...
>         *   Application.MainWindow = Me
>              DBus.Unique = True
>              DBus.Name = DBUSTEST_DBUS_NAME
>              hDbusObj = New DbusObj
>         *
> 
> 
>     Hey, thank you Bruce, it worked a treat!
>     And thank you also for your suggestion on the SystemTray.
> 
>     Cris
> 
> 
> About the SystemTray tip..
> Sorry it might be *Static Public Sub _init()* where you need to set 
> DBus.Name not *_new()*
> 
> You're welcome :)
> BruceS
> 

Using '_init' may not be a good idea, as it's a class initializer, and 
so it's not a good idea to use it to make calls in another classes.

Using a startup module with a startup Main method that will be called 
before any GUI stuff should be enough.

-- 
Benoît Minisini


More information about the User mailing list