Re: [Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread Diego Jacobi
Or an intentionally wrong written Bala, which means Bullet in spanish.
That would put enfasis on speed, i think.

Cheers.
Diego



2009/5/5 David Zeuthen :
> On Mon, 2009-05-04 at 18:30 -0400, Jamie McCracken wrote:
>> you would have to ask juerg but I always thought it was because it
>> sounds like java
>
> I've always assumed it was a reference to
>
>  http://en.wikipedia.org/wiki/Vala_Mal_Doran
>
>    David
>
>
> ___
> Vala-list mailing list
> Vala-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/vala-list
>


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


Re: [Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread David Zeuthen
On Mon, 2009-05-04 at 18:30 -0400, Jamie McCracken wrote:
> you would have to ask juerg but I always thought it was because it
> sounds like java

I've always assumed it was a reference to

 http://en.wikipedia.org/wiki/Vala_Mal_Doran

David


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


Re: [Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread Jamie McCracken
you would have to ask juerg but I always thought it was because it
sounds like java

On Mon, 2009-05-04 at 13:57 -0700, William Swanson wrote:
> On Mon, May 4, 2009 at 1:31 AM, Hans Baier  wrote:
> >> A query, why this new and innovative programming language called Vala?
> >
> > http://live.gnome.org/Vala#head-76f9b12bb9c9258b22f6dd9ce2533481f9243cc9
> 
> I think Benjamin is asking "Where does the name Vala come from?", not
> "Why does Vala exist?" This is a question I have had for a long time
> as well. Why is Vala named Vala? I know that it doesn't matter much,
> but I am still curious.
> 
> -William Swanson
> ___
> Vala-list mailing list
> Vala-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/vala-list

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


Re: [Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread William Swanson
On Mon, May 4, 2009 at 1:31 AM, Hans Baier  wrote:
>> A query, why this new and innovative programming language called Vala?
>
> http://live.gnome.org/Vala#head-76f9b12bb9c9258b22f6dd9ce2533481f9243cc9

I think Benjamin is asking "Where does the name Vala come from?", not
"Why does Vala exist?" This is a question I have had for a long time
as well. Why is Vala named Vala? I know that it doesn't matter much,
but I am still curious.

-William Swanson
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] How to call base constructors

2009-05-04 Thread Vlad Grecescu
On Mon, May 4, 2009 at 4:40 PM, Adi Roiban  wrote:

> I'm trying to extend the Gtk.CheckMenuItem and unfortunately there are
> no set_label or set_mnemonic methods.
>
> I was thinking to call the base constructor, but instead of
> gtk_check_menu_item_new_with_label, vala generates
> gtk_check_menu_item_construct_with_label
>
> Do you know how can I call a base constructor?
>
> Many thanks!
>
> Here is my example:
>
> public class ProjectMenuItem : Gtk.CheckMenuItem {
>public int id {set; get;}
>
>public ProjectMenuItem.with_label(string name) {
>base.with_label(name);
>}
>
>public ProjectMenuItem.with_mnemonic(string name) {
>base.with_mnemonic(name);
>}
>
> }
>
>
> --
> Adi Roiban
>


I ran into the same issue, and so I filed a bug:

http://bugzilla.gnome.org/show_bug.cgi?id=581362
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Glade3, GtkBuilder and signal handlers

2009-05-04 Thread Frederik
Andre "Osku" Schmidt wrote:
> so it seems:
> "FooBar" is "foo_bar_"

> and "foo_bar" is "foo_bar_"
> but what happens with "Foo_Bar" ? ;P
> (yes, it seems to follow this logic, it's "foo__bar_")

Yes, but these are uncommon class names anyway. If unsure one can always
look at the generated C code.

> and it seems i don't need that connect_signals method neither (as
> opposite to the glade example, where i copied and modified it from),
> yuhuu!

Yes, connect_signal_full is only needed if you want to customize the
signal connection process. But usually you don't need that.

> now i got a related question (as noob). what is mostly used for own
> signal handlers, inside or outside of my class ? i assume (with my
> little knowledge) the major difference would be scope-of-variables ?
> 
> (i propably just use outside for starters, as then i dont have to write
> the class name in the gtkbuilder ui file ;P)

For small programs you can put them into the global namespace. But if
you have many callbacks you will end up with a polluted global
namespace. So you might want to organize them in classes. And for
non-trivial callback methods, if you wish to access instance methods in
order to modify the state of the surrounding object, the callbacks must
be instance methods.

> cheers
> Andre
> 
> ps. and 1000x thanks for the added examples in gnome.org!

You're welcome!

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

Regards,

Frederik
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Glade3, GtkBuilder and signal handlers

2009-05-04 Thread Andre "Osku" Schmidt
On Mon, 2009-05-04 at 12:37 +0200, Frederik wrote:
> If you declare a callback method inside a class you have to prefix the
> callback method name in Glade with the class name in lower case letters.
> So try:
> 
>   gtk_builder_sample_on_button1_clicked
> 
> instead of
> 
>   on_button1_clicked

aah, thanks!

so it seems:
"FooBar" is "foo_bar_"
and "foo_bar" is "foo_bar_"
but what happens with "Foo_Bar" ? ;P
(yes, it seems to follow this logic, it's "foo__bar_")

> PS: You don't have to add --Xcc="-Wl,--export-dynamic", since this is
> already added by pkg-config for gmodule-2.0 (see
> /usr/lib/pkgconfig/gmodule-2.0.pc).

aah, thanks!

and it seems i don't need that connect_signals method neither (as
opposite to the glade example, where i copied and modified it from),
yuhuu!

now i got a related question (as noob). what is mostly used for own
signal handlers, inside or outside of my class ? i assume (with my
little knowledge) the major difference would be scope-of-variables ?

(i propably just use outside for starters, as then i dont have to write
the class name in the gtkbuilder ui file ;P)

cheers
Andre

ps. and 1000x thanks for the added examples in gnome.org!

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


[Vala] How to call base constructors

2009-05-04 Thread Adi Roiban
I'm trying to extend the Gtk.CheckMenuItem and unfortunately there are
no set_label or set_mnemonic methods.

I was thinking to call the base constructor, but instead of 
gtk_check_menu_item_new_with_label, vala generates
gtk_check_menu_item_construct_with_label

Do you know how can I call a base constructor?

Many thanks!

Here is my example:

public class ProjectMenuItem : Gtk.CheckMenuItem {
public int id {set; get;}

public ProjectMenuItem.with_label(string name) {
base.with_label(name);
}

public ProjectMenuItem.with_mnemonic(string name) {
base.with_mnemonic(name);
}

}


-- 
Adi Roiban

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


Re: [Vala] Glade3, GtkBuilder and signal handlers

2009-05-04 Thread Frederik
Andre "Osku" Schmidt wrote:
> Hello,
> 
> i'm a hobby coder having a lot of fun with vala and gtk (except
> treeview ;). and i'm now in the process off trying to create something
> useful with vala (more on that later).
> 
> i was trying to adapt the GladeSample[0] to use Gtk.Builder (as i didn't
> found any examples of this), after a (long) while i got something that
> didn't give me any compile-time errors... but sadly i lack some general
> info about all this, to understand why the signal handler is not found.
> 
> so, would be very helpful if someone could kick me in the right
> direction. attached is a test case how far i got.
> 
> cheers
> Andre "Osku" Schmidt
> 
> [0] http://live.gnome.org/Vala/GladeSample
> 
> ps. my system is ubuntu9.04 64bit, glade3.6.1, valac0.7.2(svn)

I have found the problem:

If you declare a callback method inside a class you have to prefix the
callback method name in Glade with the class name in lower case letters.
So try:

  gtk_builder_sample_on_button1_clicked

instead of

  on_button1_clicked


PS: You don't have to add --Xcc="-Wl,--export-dynamic", since this is
already added by pkg-config for gmodule-2.0 (see
/usr/lib/pkgconfig/gmodule-2.0.pc).


Regards,

Frederik
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Glade3, GtkBuilder and signal handlers

2009-05-04 Thread Frederik
Andre "Osku" Schmidt wrote:
> Hello,
> 
> i'm a hobby coder having a lot of fun with vala and gtk (except
> treeview ;). and i'm now in the process off trying to create something
> useful with vala (more on that later).
> 
> i was trying to adapt the GladeSample[0] to use Gtk.Builder (as i didn't
> found any examples of this), after a (long) while i got something that
> didn't give me any compile-time errors... but sadly i lack some general
> info about all this, to understand why the signal handler is not found.
> 
> so, would be very helpful if someone could kick me in the right
> direction. attached is a test case how far i got.

Hi,

perhaps you are missing the '--pkg gmodule-2.0' option.

I have added a simple GtkBuilder sample with signal auto-connection to
the wiki:

http://live.gnome.org/Vala/GTKSample#head-e558b6b451800cf5547de009be1435b7f90d8d37


Regards,

Frederik
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread Hans Baier
2009/5/4 Benjamin Solis :
> Hi:
>
> A query, why this new and innovative programming language called Vala?
>

http://live.gnome.org/Vala#head-76f9b12bb9c9258b22f6dd9ce2533481f9243cc9
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread Benjamin Solis
Hi:

A query, why this new and innovative programming language called Vala?

lince2...@gmail.com

Hola:

Una consulta, ¿porque este nuevo y novedoso lenguaje de programacion de
gnome se llama VALA...?

lince2...@gmail.com
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list