[Gambas-user] [Gambas Bug Tracker] Bug #1272: DBus not fully case sensitive

Jussi Lahtinen jussi.lahtinen at gmail.com
Thu Mar 22 00:45:30 CET 2018


Gambas does not accept anything declared with same name. So that should
generate error.

.State() gives value of the function.
.State gives reference to the same function.

The case doesn't matter.


I don't understand the documentation:
https://developer.gnome.org/NetworkManager/stable/gdbus-org.freedesktop.NetworkManager.html

The property and method seem to do exactly the same thing. Maybe it is just
error.



Jussi

On Thu, Mar 22, 2018 at 1:34 AM, Jussi Lahtinen <jussi.lahtinen at gmail.com>
wrote:

> I don't think that is true. No where in your example you are reading the
> property, all the references are made to the function.
>
>
> Jussi
>
>
>
> On Thu, Mar 22, 2018 at 1:20 AM, T Lee Davidson <t.lee.davidson at gmail.com>
> wrote:
>
>> I mean that the org.freedesktop.NetworkManager DBus application/interface
>> has a method named "state" _and_ a property named
>> "State". So to invoke the method, one would use ".state()" and to read
>> the property, ".State".
>>
>>
>> On 03/21/2018 03:22 PM, Jussi Lahtinen wrote:
>> > What you mean by property and method with same name? That shouldn't be
>> possible, despite of different case. Unless you are over
>> > driving the declaration, but then there is only either the property or
>> the function... still I don't think that should be possible.
>> >
>> >
>> > Jussi
>> >
>> > On Wed, Mar 21, 2018 at 9:17 PM, Jussi Lahtinen <
>> jussi.lahtinen at gmail.com <mailto:jussi.lahtinen at gmail.com>> wrote:
>> >
>> >     ??
>> >
>> >     The error is in this line:
>> >     Try iState = hDBusProxy.State
>> >
>> >     It should be:
>> >     Try iState = hDBusProxy.State()
>> >
>> >     Or:
>> >     Try iState = hDBusProxy.state()
>> >
>> >     The case doesn't matter in Gambas.
>> >
>> >
>> >     Jussi
>> >
>> >
>> >     On Wed, Mar 21, 2018 at 8:01 PM, <bugtracker at gambaswiki.org
>> <mailto:bugtracker at gambaswiki.org>> wrote:
>> >
>> >         http://gambaswiki.org/bugtracker/edit?object=BUG.1272&from=
>> L21haW4-
>> >         <http://gambaswiki.org/bugtracker/edit?object=BUG.1272&
>> from=L21haW4->
>> >
>> >         Comment #1 by Benoît MINISINI:
>> >
>> >         It's Gambas that is not case sensitive. It picks the case from
>> the first time the symbol is encountered.
>> >
>> >         So if it sees ".state()" first, it will use lower case for all
>> occurrences of that symbol ('State', 'sTaTE', 'STATE'...)
>> >         and you won't get any error.
>> >
>> >         Otherwise, if you use for example '.State()' first, you will
>> get an error.
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180322/dea0bd8e/attachment.html>


More information about the User mailing list