[Gambas-user] [Gambas Bug Tracker] Bug #1272: DBus not fully case sensitive
T Lee Davidson
t.lee.davidson at gmail.com
Thu Mar 22 00:20:38 CET 2018
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.
>
More information about the User
mailing list