Re: [Vala] avoid "method never used" warning for methods linked to Glade files in private class

2018-05-03 Thread Luc Chante
Hi,

Except for nested class, I never found "private class" a good design (C#
doesn't allow it).
Your class should probaly be internal.

Just a suggestion :
Is there a name conflict with your methods ?
When the class is public, the vala scope resolver found them, but when the
class is private/internal it points at other methods with the same name and
not yours ?

You should look into gtk templates to bind callbacks to your ui, it's quite
simple.

Luc.

Le mer. 2 mai 2018 à 00:54, rastersoft  a écrit :

> Hi:
>
> Yes, still have they.
>
>
> El 02/05/18 a las 00:08, Al Thomas escribió:
> > > On Tuesday, 1 May 2018, 17:49:09 BST, rastersoft
> >  wrote:
> > > When the class is public everything is fine, but when I declare it as
> > > private (which I need for several reasons) I receive a "method ''
> > > never used" warning.
> >
> > > How can I avoid those warnings?
> >
> > Do you still get the warning if you mark it 'internal' instead of
> > 'private'?
>
> ___
> 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] avoid "method never used" warning for methods linked to Glade files in private class

2018-05-01 Thread rastersoft

Hi:

Yes, still have they.


El 02/05/18 a las 00:08, Al Thomas escribió:
> On Tuesday, 1 May 2018, 17:49:09 BST, rastersoft 
 wrote:

> When the class is public everything is fine, but when I declare it as
> private (which I need for several reasons) I receive a "method ''
> never used" warning.

> How can I avoid those warnings?

Do you still get the warning if you mark it 'internal' instead of 
'private'?


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


Re: [Vala] avoid "method never used" warning for methods linked to Glade files in private class

2018-05-01 Thread Al Thomas via vala-list
> On Tuesday, 1 May 2018, 17:49:09 BST, rastersoft  
wrote: > When the class is public everything is fine, but when I declare it as 
> private (which I need for several reasons) I receive a "method '' 
> never used" warning.

> How can I avoid those warnings?

Do you still get the warning if you mark it 'internal' instead of 'private'?  
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] avoid "method never used" warning for methods linked to Glade files in private class

2018-05-01 Thread rastersoft

Hi:

No, no... the methods are public; the class is what is private. And I'm 
using "connect_signals", so the source doesn't seem to use the method, 
but it is used.



El 01/05/18 a las 19:47, Andres Fernandez escribió:



El mar., 1 may. 2018 13:49, rastersoft > escribió:


Hi all:

I need to create a class with several methods that are used as
callbacks
for buttons and other widgets, but they are defined in a Glade file.

When the class is public everything is fine, but when I declare it as
private (which I need for several reasons) I receive a "method ''
never used" warning.

How can I avoid those warnings?

Thanks.


HI!

If a method is private should be used inside the class it belongs. 
Connecting it to a signal, if is a callback should avoid that warning.



Are you using GtkTemplates?



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


Re: [Vala] avoid "method never used" warning for methods linked to Glade files in private class

2018-05-01 Thread Andres Fernandez
El mar., 1 may. 2018 13:49, rastersoft  escribió:

> Hi all:
>
> I need to create a class with several methods that are used as callbacks
> for buttons and other widgets, but they are defined in a Glade file.
>
> When the class is public everything is fine, but when I declare it as
> private (which I need for several reasons) I receive a "method ''
> never used" warning.
>
> How can I avoid those warnings?
>
> Thanks.
>

HI!

If a method is private should be used inside the class it belongs.
Connecting it to a signal, if is a callback should avoid that warning.


Are you using GtkTemplates?

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


[Vala] avoid "method never used" warning for methods linked to Glade files in private class

2018-05-01 Thread rastersoft

Hi all:

I need to create a class with several methods that are used as callbacks 
for buttons and other widgets, but they are defined in a Glade file.


When the class is public everything is fine, but when I declare it as 
private (which I need for several reasons) I receive a "method '' 
never used" warning.


How can I avoid those warnings?

Thanks.

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