[Gambas-user] Dbus mpris setting volume needs type d, but how?

Bruce Steers bsteers4 at gmail.com
Sun Jan 29 13:02:39 CET 2023

On Sun, 29 Jan 2023 at 07:48, Fabien Bodard <gambas.fr at gmail.com> wrote:

> Le dim. 29 janv. 2023 à 00:23, Bruce Steers <bsteers4 at gmail.com> a écrit :
>> the command is ...
>>   DBus["session://" & cp.Address]["/org/mpris/MediaPlayer2",
>> "org.mpris.MediaPlayer2.Player"].Volume = 0.5
>> I've tried to make the 0.5 be a float , use CFloat, tried all sorts, it
>> always says i'm using type v and need to use type d :-\ !?
> In this case it look like a bug in gb.dbus
> Another question ... Why are you using your own themed icon routine ? (I'm
> curious) as Stock class do the job...or maybe not as you want ...

Do you mean the AppIcon.SearchIcons() routine ?  because it works a lot
better than Desktop.GetIcon() that fails to find half the icons..  It's
slower but much more successful at getting icons from things like gambas
that do not use a path for the Icon=gambas3 setting.
I don't think I set a theme? it can take a PreferedTheme arg but i did not
use it. will have a look as the class is copied from another project. i
thought it's set to use whatever the default is..

A BUG???  surely not?!
Do i need to use the DBusVariable class or something to make a Float/Double
or should using a gambas Float work as expected?  I'm sure the docs say
something about gambas only uses v type and if you need another type you
have to do something different. (inheriting DBusValues.class or something,
i just don't know how)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230129/db06d44c/attachment.htm>

More information about the User mailing list