I am developing an application that conditionally registers an object on the DBus session bus. I have to use the Form_Close event to, if it was registered, unregister the object or the form will close but the application will not stop.
Based on http://gambaswiki.org/wiki/comp/gb.dbus/dbus/isregistered : [quote] DBus.IsRegistered (gb.dbus) Static Function IsRegistered ( Object As DBusObject ) As Boolean Return if the specified object is registered on a DBus bus. [/quote] my code is: [code] Public Sub Form_Close() If DBus.IsRegistered(MyDBusObject) Then DBus.Session.Unregister(MyDBusObject) Endif End [/code] When the form is closed, I get, "Unknown symbol 'IsRegistered' in class 'Dbus'". Did I miss something in the documented syntax? As a temporary workaround, I can use: [code] If DBus["org.freedesktop.DBus"]["/"].NameHasOwner(DBus.Name) Then DBus.Session.Unregister(MyDBusObject) Endif [/code] But that is not very granular. System Information: [System] Gambas=3.6.2 OperatingSystem=Linux Kernel=4.1.15-desktop-2.mga5 Architecture=x86_64 Distribution=Mageia 5 Desktop=KDE4 Theme=Oxygen Language=en_US.UTF-8 Memory=2002M [Libraries] Curl=libcurl.so.4.3.0 DBus=libdbus-1.so.3.8.13 GStreamer=libgstreamer-0.10.so.0.30.0 GStreamer=libgstreamer-1.0.so.0.403.0 OpenGL=libGL.so.1.2.0 Qt4=libQtCore.so.4.8.6 -- Lee __________ "Artificial Intelligence is no match for natural stupidity." ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user