Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Al Thomas via vala-list
 
> On Wednesday, 20 February 2019, 13:30:08 GMT, Wolfgang Mauer 
 wrote:  > The sample was C#, but yes i do use ... 
--pkg=gio-2.0

> I know the problem(have a look to compiler.vala), that's why i ask to 
> "improve".

One possibility is the Vala compiler is applying different symbol resolution 
rules for properties and inheritance. So public Menu menu; is generating a 
conflict, whereas class App:Application {} is using the first 
symbolencountered. If it is following the latter rule then I would say that was 
a bug.
A test case illustrating the bug is required and then an issue to be opened at 
gitlab.gnome.org 


Am 20.02.19 um 14:20 schrieb Al Thomas via vala-list:
>    > On Wednesday, 20 February 2019, 13:16:38 GMT, Wolfgang Mauer 
> wrote:  >> The same would happen in C# if you 
>had two
>>> classes/interfaces/whatever with the same name but defined in distinct
>>> namespaces.
>> Sorry, but you are wrong!!!
>> The "Application" is ONLY resolved by the "using Gtk;" and not
>> "GLib.Application"
> Are you using --pkg gio-2.0 ? GLib.Application is part of the gio-2.0 binding.
>    
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list

  
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Miguel Miranda via vala-list
Hi again Wolfang,

It's not what you are trying to state but how yo do it.

For example, i'm pretty sure that you can't define two distinct classes
with the same name in the same domain/namespace (not that it's impossible -
it's a consequence and an expected behaviour).

So, if we have two distinct classes in separated namespaces, we must be
unambiguous about each one we are referring to otherwise we enter the
assumption field. Full dot.

Now, your concrete problem and you should address it. First, you should
explained which vala version you are using and give some context. Even when
you suppressed that information we assumed the latest vala and said that
using GLib is "invisible" or as I said it, is included by default.

Then you thrown a C# example which we don't know nothing about, is that
mono? what is that? using Gtk.. well If it's not Valac then probably it's
not including by default the "using GLib". If that's it then There's no
conflict.

It's best to give all the information so there is some context and avoid
assumptions.

I'm trying to be constructive here and not a flamer.

There was/is also the possibility of an implementation error which if found
we could try to find and answer/file a bug/etc.

Try, in your C# environment, declare a using GLib. Is there a ambiguity
with the Application class?

Cheers, peace.

On Wed, Feb 20, 2019 at 2:25 PM Wolfgang Mauer 
wrote:

> I have only described the facts how it works in C#!Did not want to attack 
> anyone here...
>
> /Wolfgang
>
> Am 20.02.19 um 15:13 schrieb Miguel Miranda:
>
>  Implementation maybe wrong but i'm not. I have no problems in assuming
> guilt or blame. Just try to be more constructive and expose things as they
> are not as they fit you.
>
> We are here to help...
>
> On Wed, Feb 20, 2019, 13:16 Wolfgang Mauer  wrote:
>
>> > The same would happen in C# if you had two classes/interfaces/whatever
>> with the same name but defined in distinct namespaces.
>>
>>
>> Sorry, but you are wrong!!!
>>
>> The "Application" is ONLY resolved by the "using Gtk;" and not
>> "GLib.Application"
>> using System;
>> using System.Runtime.InteropServices;
>> using Gtk;
>> namespace myNamespace
>> {
>> public class myClass : Application
>> {
>>
>> Am 20.02.19 um 14:06 schrieb Miguel Miranda via vala-list:
>>
>> The same would happen in C# if you had two classes/interfaces/whatever with
>> the same name but defined in distinct namespaces. That's one of the reasons
>> they do exist.
>>
>> You must be specific to which you are referring to by specifying the
>> correct namespace.
>>
>> Vala includes GLib namespace by default, just that.
>>
>>
>> On Wed, Feb 20, 2019 at 12:50 PM Wolfgang Mauer 
>>  
>> wrote:
>>
>>
>> I hope that this can be improved in future versions!
>>
>> I far as i know, there some duplicated classes in GLib/Gtk
>> Menu
>> MenuItem
>> ListStore
>> ..
>> In C# the "using" in my source is crucial.
>>
>> /Wolfgang
>>
>>
>> Am 20.02.19 um 13:36 schrieb Miguel Miranda via vala-list:
>>
>> GLib is included by default.
>>
>> valac did find a conflict between namespaces so you must be specific
>>
>> about
>>
>> the Menu's namespace you want to use.
>>
>> Just use public .Menu menu where  is either GLib or
>> Gtk.
>>
>> I'll assume you are trying to use Gtk.Menu so change to:
>>
>> public Gtk.Menu menu
>>
>> Cheers.
>>
>> On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer <
>>
>> wolfgang.ma...@kabelmail.de>
>>
>> wrote:
>>
>>
>> Hi all,
>> in my source i just have
>>
>>   using Gtk;
>>
>> and no other using!
>> Now if i want to use
>>
>>   public Menu menu;
>>
>> i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
>> `Gtk.Menu'
>> But i don't have a "using GLib;" in my source !!!
>>
>> Is this a Bug?
>>
>> Greetings
>> Wolfgang
>>
>> ___
>> vala-list mailing 
>> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>>
>> ___
>> vala-list mailing 
>> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>>
>> ___
>> vala-list mailing 
>> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>>
>> ___
>> vala-list mailing 
>> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>>
>>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Wolfgang Mauer
I have only described the facts how it works in C#! Did not want to 
attack anyone here... /Wolfgang


Am 20.02.19 um 15:13 schrieb Miguel Miranda:
 Implementation maybe wrong but i'm not. I have no problems in 
assuming guilt or blame. Just try to be more constructive and expose 
things as they are not as they fit you.


We are here to help...

On Wed, Feb 20, 2019, 13:16 Wolfgang Mauer 
mailto:wolfgang.ma...@kabelmail.de> wrote:


> The same would happen in C# if you had two
classes/interfaces/whatever with the same name but defined in
distinct namespaces.


Sorry, but you are wrong!!!


The "Application" is ONLY resolved by the "using Gtk;" and not
"GLib.Application"

usingSystem;
usingSystem.Runtime.InteropServices;
usingGtk;
namespacemyNamespace
{
publicclassmyClass:Application
{

Am 20.02.19 um 14:06 schrieb Miguel Miranda via vala-list:

The same would happen in C# if you had two classes/interfaces/whatever with
the same name but defined in distinct namespaces. That's one of the reasons
they do exist.

You must be specific to which you are referring to by specifying the
correct namespace.

Vala includes GLib namespace by default, just that.


On Wed, Feb 20, 2019 at 12:50 PM Wolfgang Mauer  

wrote:


I hope that this can be improved in future versions!

I far as i know, there some duplicated classes in GLib/Gtk
Menu
MenuItem
ListStore
.
In C# the "using" in my source is crucial.

/Wolfgang


Am 20.02.19 um 13:36 schrieb Miguel Miranda via vala-list:

GLib is included by default.

valac did find a conflict between namespaces so you must be specific

about

the Menu's namespace you want to use.

Just use public .Menu menu where  is either GLib or
Gtk.

I'll assume you are trying to use Gtk.Menu so change to:

public Gtk.Menu menu

Cheers.

On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer <

wolfgang.ma...@kabelmail.de  >

wrote:


Hi all,
in my source i just have

   using Gtk;

and no other using!
Now if i want to use

   public Menu menu;

i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
`Gtk.Menu'
But i don't have a "using GLib;" in my source !!!

Is this a Bug?

Greetings
Wolfgang

___
vala-list mailing list
vala-list@gnome.org  
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org  
https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org  
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org  
https://mail.gnome.org/mailman/listinfo/vala-list



___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Miguel Miranda via vala-list
 Implementation maybe wrong but i'm not. I have no problems in assuming
guilt or blame. Just try to be more constructive and expose things as they
are not as they fit you.

We are here to help...

On Wed, Feb 20, 2019, 13:16 Wolfgang Mauer  > The same would happen in C# if you had two classes/interfaces/whatever
> with the same name but defined in distinct namespaces.
>
>
> Sorry, but you are wrong!!!
>
> The "Application" is ONLY resolved by the "using Gtk;" and not
> "GLib.Application"
> using System;
> using System.Runtime.InteropServices;
> using Gtk;
> namespace myNamespace
> {
> public class myClass : Application
> {
>
> Am 20.02.19 um 14:06 schrieb Miguel Miranda via vala-list:
>
> The same would happen in C# if you had two classes/interfaces/whatever with
> the same name but defined in distinct namespaces. That's one of the reasons
> they do exist.
>
> You must be specific to which you are referring to by specifying the
> correct namespace.
>
> Vala includes GLib namespace by default, just that.
>
>
> On Wed, Feb 20, 2019 at 12:50 PM Wolfgang Mauer  
> 
> wrote:
>
>
> I hope that this can be improved in future versions!
>
> I far as i know, there some duplicated classes in GLib/Gtk
> Menu
> MenuItem
> ListStore
> .
> In C# the "using" in my source is crucial.
>
> /Wolfgang
>
>
> Am 20.02.19 um 13:36 schrieb Miguel Miranda via vala-list:
>
> GLib is included by default.
>
> valac did find a conflict between namespaces so you must be specific
>
> about
>
> the Menu's namespace you want to use.
>
> Just use public .Menu menu where  is either GLib or
> Gtk.
>
> I'll assume you are trying to use Gtk.Menu so change to:
>
> public Gtk.Menu menu
>
> Cheers.
>
> On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer <
>
> wolfgang.ma...@kabelmail.de>
>
> wrote:
>
>
> Hi all,
> in my source i just have
>
>   using Gtk;
>
> and no other using!
> Now if i want to use
>
>   public Menu menu;
>
> i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
> `Gtk.Menu'
> But i don't have a "using GLib;" in my source !!!
>
> Is this a Bug?
>
> Greetings
> Wolfgang
>
> ___
> vala-list mailing 
> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>
> ___
> vala-list mailing 
> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>
>
> ___
> vala-list mailing 
> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>
> ___
> vala-list mailing 
> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Wolfgang Mauer

The sample was C#, but yes i do use

--pkg=gobject-2.0 --pkg=gio-unix-2.0 --pkg=gdk-3.0 --pkg=gtk+-3.0 
--pkg=libxml-2.0 --pkg=gio-2.0 --pkg=json-glib-1.0 --pkg=glib-2.0 
--pkg=gmodule-2.0 --pkg=gee-0.8 --pkg=gtksourceview-3.0 .


I know the problem(have a look to compiler.vala), that's why i ask to 
"improve".



Am 20.02.19 um 14:20 schrieb Al Thomas via vala-list:

> On Wednesday, 20 February 2019, 13:16:38 GMT, Wolfgang Mauer 
 wrote:  >> The same would happen in C# if you had two

classes/interfaces/whatever with the same name but defined in distinct
namespaces.

Sorry, but you are wrong!!!
The "Application" is ONLY resolved by the "using Gtk;" and not
"GLib.Application"

Are you using --pkg gio-2.0 ? GLib.Application is part of the gio-2.0 binding.
   
___

vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Al Thomas via vala-list
   > On Wednesday, 20 February 2019, 13:16:38 GMT, Wolfgang Mauer 
 wrote:  >> The same would happen in C# if you had 
two 
>> classes/interfaces/whatever with the same name but defined in distinct 
>> namespaces.

> Sorry, but you are wrong!!!
> The "Application" is ONLY resolved by the "using Gtk;" and not 
> "GLib.Application"

Are you using --pkg gio-2.0 ? GLib.Application is part of the gio-2.0 binding.
  
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Wolfgang Mauer
> The same would happen in C# if you had two 
classes/interfaces/whatever with the same name but defined in distinct 
namespaces.



Sorry, but you are wrong!!!


The "Application" is ONLY resolved by the "using Gtk;" and not 
"GLib.Application"


usingSystem;
usingSystem.Runtime.InteropServices;
usingGtk;
namespacemyNamespace
{
publicclassmyClass:Application
{

Am 20.02.19 um 14:06 schrieb Miguel Miranda via vala-list:

The same would happen in C# if you had two classes/interfaces/whatever with
the same name but defined in distinct namespaces. That's one of the reasons
they do exist.

You must be specific to which you are referring to by specifying the
correct namespace.

Vala includes GLib namespace by default, just that.


On Wed, Feb 20, 2019 at 12:50 PM Wolfgang Mauer 
wrote:


I hope that this can be improved in future versions!

I far as i know, there some duplicated classes in GLib/Gtk
Menu
MenuItem
ListStore

In C# the "using" in my source is crucial.

/Wolfgang


Am 20.02.19 um 13:36 schrieb Miguel Miranda via vala-list:

GLib is included by default.

valac did find a conflict between namespaces so you must be specific

about

the Menu's namespace you want to use.

Just use public .Menu menu where  is either GLib or
Gtk.

I'll assume you are trying to use Gtk.Menu so change to:

public Gtk.Menu menu

Cheers.

On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer <

wolfgang.ma...@kabelmail.de>

wrote:


Hi all,
in my source i just have

   using Gtk;

and no other using!
Now if i want to use

   public Menu menu;

i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
`Gtk.Menu'
But i don't have a "using GLib;" in my source !!!

Is this a Bug?

Greetings
Wolfgang

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Miguel Miranda via vala-list
The same would happen in C# if you had two classes/interfaces/whatever with
the same name but defined in distinct namespaces. That's one of the reasons
they do exist.

You must be specific to which you are referring to by specifying the
correct namespace.

Vala includes GLib namespace by default, just that.


On Wed, Feb 20, 2019 at 12:50 PM Wolfgang Mauer 
wrote:

> I hope that this can be improved in future versions!
>
> I far as i know, there some duplicated classes in GLib/Gtk
> Menu
> MenuItem
> ListStore
> 
> In C# the "using" in my source is crucial.
>
> /Wolfgang
>
>
> Am 20.02.19 um 13:36 schrieb Miguel Miranda via vala-list:
> > GLib is included by default.
> >
> > valac did find a conflict between namespaces so you must be specific
> about
> > the Menu's namespace you want to use.
> >
> > Just use public .Menu menu where  is either GLib or
> > Gtk.
> >
> > I'll assume you are trying to use Gtk.Menu so change to:
> >
> > public Gtk.Menu menu
> >
> > Cheers.
> >
> > On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer <
> wolfgang.ma...@kabelmail.de>
> > wrote:
> >
> >> Hi all,
> >> in my source i just have
> >>
> >>   using Gtk;
> >>
> >> and no other using!
> >> Now if i want to use
> >>
> >>   public Menu menu;
> >>
> >> i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
> >> `Gtk.Menu'
> >> But i don't have a "using GLib;" in my source !!!
> >>
> >> Is this a Bug?
> >>
> >> Greetings
> >> Wolfgang
> >>
> >> ___
> >> vala-list mailing list
> >> vala-list@gnome.org
> >> https://mail.gnome.org/mailman/listinfo/vala-list
> >>
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Wolfgang Mauer

I hope that this can be improved in future versions!

I far as i know, there some duplicated classes in GLib/Gtk
Menu
MenuItem
ListStore

In C# the "using" in my source is crucial.

/Wolfgang


Am 20.02.19 um 13:36 schrieb Miguel Miranda via vala-list:

GLib is included by default.

valac did find a conflict between namespaces so you must be specific about
the Menu's namespace you want to use.

Just use public .Menu menu where  is either GLib or
Gtk.

I'll assume you are trying to use Gtk.Menu so change to:

public Gtk.Menu menu

Cheers.

On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer 
wrote:


Hi all,
in my source i just have

  using Gtk;

and no other using!
Now if i want to use

  public Menu menu;

i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
`Gtk.Menu'
But i don't have a "using GLib;" in my source !!!

Is this a Bug?

Greetings
Wolfgang

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Miguel Miranda via vala-list
GLib is included by default.

valac did find a conflict between namespaces so you must be specific about
the Menu's namespace you want to use.

Just use public .Menu menu where  is either GLib or
Gtk.

I'll assume you are trying to use Gtk.Menu so change to:

public Gtk.Menu menu

Cheers.

On Wed, Feb 20, 2019 at 12:14 PM Wolfgang Mauer 
wrote:

> Hi all,
> in my source i just have
>
>  using Gtk;
>
> and no other using!
> Now if i want to use
>
>  public Menu menu;
>
> i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
> `Gtk.Menu'
> But i don't have a "using GLib;" in my source !!!
>
> Is this a Bug?
>
> Greetings
> Wolfgang
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Wolfgang Mauer

I thought so, but why and still a Bug?


Wolfgang
Am 20.02.19 um 13:25 schrieb Jiří Janoušek:

Hello,

The namespace GLib is imported by default. Imagine an invisible `using
GLib;` line at the beginning of every Vala file.

Jiri

On Wed, 20 Feb 2019 at 13:14, Wolfgang Mauer
 wrote:

Hi all,
in my source i just have

  using Gtk;

and no other using!
Now if i want to use

  public Menu menu;

i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
`Gtk.Menu'
But i don't have a "using GLib;" in my source !!!

Is this a Bug?

Greetings
Wolfgang

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie question (using directive)

2019-02-20 Thread Jiří Janoušek via vala-list
Hello,

The namespace GLib is imported by default. Imagine an invisible `using
GLib;` line at the beginning of every Vala file.

Jiri

On Wed, 20 Feb 2019 at 13:14, Wolfgang Mauer
 wrote:
>
> Hi all,
> in my source i just have
>
>  using Gtk;
>
> and no other using!
> Now if i want to use
>
>  public Menu menu;
>
> i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and
> `Gtk.Menu'
> But i don't have a "using GLib;" in my source !!!
>
> Is this a Bug?
>
> Greetings
> Wolfgang
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Newbie question (using directive)

2019-02-20 Thread Wolfgang Mauer

Hi all,
in my source i just have

    using Gtk;

and no other using!
Now if i want to use

    public Menu menu;

i get -> error: `Menu' is an ambiguous reference between `GLib.Menu' and 
`Gtk.Menu'

But i don't have a "using GLib;" in my source !!!

Is this a Bug?

Greetings
Wolfgang

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list