[Vala] [BUG] Re: Closures and local variables

2011-02-07 Thread Jan Hudec
On Mon, Feb 07, 2011 at 15:03:38 +0100, Sylvain Leroux wrote: I'm still having hard time using closures in Vala. You found a bug in vala. I suspect it's the same bug as: https://bugzilla.gnome.org/show_bug.cgi?id=611460 https://bugzilla.gnome.org/show_bug.cgi?id=635194

Re: [Vala] Vala vs Mono performance benchmark project

2011-01-31 Thread Jan Hudec
On Mon, Jan 31, 2011 at 17:35:09 +, Aleksander Wabik wrote: Hi Pancake, I'll play with signals for a moment - will the marshallers be gone when using g_signal_emit()? I guess that they are generating much overhead... Unfortunately, no, they won't. They are there because C cannot do

Re: [Vala] benchmarks on Vala?

2011-01-18 Thread Jan Hudec
On Tue, Jan 18, 2011 at 09:18:06 -0300, Erick Pérez Castellanos wrote: I haven't prove it but theoretically can't be slower since Mono applications are running on the top of a virtual machine and Vala applications are native code executed, so kinda hard to think that Mono is faster than Vala,

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-16 Thread Jan Hudec
On Sun, Jan 16, 2011 at 03:00:06 +, Aleksander Wabik wrote: But I was not thinking of the speedup at the level of acquiring memory, but at the level of object construction. Let's say we have an object that has some fields. Now constructing such object requires allocating memory and then

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-15 Thread Jan Hudec
On Sat, Jan 15, 2011 at 19:58:37 +0100, Marco Trevisan (Treviño) wrote: Il giorno sab, 15/01/2011 alle 19.09 +0100, Jiří Zárevúcky ha scritto: Yes, it's not the same, but it's a similar implementation, using reference counting (it's not atomic, but if you use an sig_atomic_t ref

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-15 Thread Jan Hudec
On Sat, Jan 15, 2011 at 20:56:45 +0100, Jan Hudec wrote: On Sat, Jan 15, 2011 at 19:58:37 +0100, Marco Trevisan (Treviño) wrote: However I don't think that an atomic add or fetch-and-add (or call them inc and dec-and-test) correctly used in plain C wouldn't cause all this performance gap

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-15 Thread Jan Hudec
On Sat, Jan 15, 2011 at 22:53:25 +0100, Jiří Zárevúcky wrote: 2011/1/15 Aleksander Wabik alex.wa...@gmail.com: There are other relevant reasons to choose Vala over C#, but speed is not one of them. :) This is... very sad. JIT is cool, because it helps to get rid of performance problems

Re: [Vala] vala code generation too constrained?

2011-01-12 Thread Jan Hudec
On Mon, Jan 10, 2011 at 12:03:16 +0800, Nor Jaidi Tuah wrote: Some of the big gotchas in vala is due to the desire to produce a standardized C code that can interface nicely with non-vala module. I suspect this constrain also makes it difficult to implement some features. Vala is interesting

Re: [Vala] fuse.vapi help

2011-01-05 Thread Jan Hudec
On Wed, Jan 05, 2011 at 10:36:26 -0500, Matt Harrison wrote: Can anyone get me pointed in the right direction on this? Thanks! On Wed, Dec 22, 2010 at 3:33 PM, Matt Harrison matt61...@gmail.com wrote: Hi, I'm trying to just do a basic example of using the fuse.vapi file to learn

Re: [Vala] Threads with return value... Isn't this a memory leak?

2011-01-04 Thread Jan Hudec
On Tue, Jan 04, 2011 at 16:30:38 +0100, Marco Trevisan (Treviño) wrote: Consider this simple vala code, which uses some threads with return value... Since int[] can't be a generics, I need to use an int pointer for using an integer array as retourn value... No, but a class IntArray {

Re: [Vala] Name clashes in generated C code

2010-12-29 Thread Jan Hudec
On Tue, Dec 28, 2010 at 15:32:07 -0800, Anatol Pomozov wrote: I am sure using [CCode] is ok for libraries as well if cprefix value does not change very often. The reason to try to avoid [CCode] for libraries is that users of the library will expect the code to follow some naming convention,

Re: [Vala] Name clashes in generated C code

2010-12-28 Thread Jan Hudec
On Mon, Dec 27, 2010 at 13:46:47 -0800, Anatol Pomozov wrote: Hi, I have a simple Vala program public struct Struct { string name; } public enum Type { STRUCT } [...] The problem here a name clash in generated Vala code - TYPE_STRUCT both generated as type of Struct #define

Re: [Vala] Bug in vala

2010-12-13 Thread Jan Hudec
On Fri, Dec 10, 2010 at 15:34:32 +0100, Abderrahim Kitouni wrote: Hello, في ج، 10-12-2010 عند 00:40 -0300 ، كتب Erick Pérez Castellanos: Is this a bug ??? I'm using Glib.Settings API, and specifically this: public bool set_strv (string key, [CCode (array_length = false)]

Re: [Vala] file globbing?

2010-12-07 Thread Jan Hudec
On Tue, Dec 07, 2010 at 21:59:42 +0200, Jani Monoses wrote: is there an easy way of getting a list of files matching a pattern in a directory (like Python's glob.glob() ) short of enumerate_children() and checking each returned name explicitly using regexps? POSIX has a function glob to do

Re: [Vala] Dbus, connecting a signal to an async method...

2010-12-05 Thread Jan Hudec
On Sat, Dec 04, 2010 at 12:35:26 +0100, Marco Trevisan (Treviño) wrote: Il giorno ven, 03/12/2010 alle 17.18 +0100, Abderrahim Kitouni ha scritto: session_proxy.name_acquired.connect (this.name_acquired); What I would have done is: session_proxy.name_acquired.connect ((name) =

Re: [Vala] Cannot have field and method with the same name

2010-12-05 Thread Jan Hudec
On Fri, Dec 03, 2010 at 15:38:38 -0800, Anatol Pomozov wrote: I have a class that contains a field and method with the same name, and Valac does not like it. What is the reason? Other languages (C#/Java) allow it. Pardon me. C# does NOT allow that: test.cs(3,17): error CS0102: The type `Foo'

Re: [Vala] Interfaces - why do they must have prerequisites?

2010-12-05 Thread Jan Hudec
On Sun, Dec 05, 2010 at 17:32:17 +0100, Aleksander Wabik wrote: I'm having class Foo, that is _NOT_ inheriting Object, but it's still a typed class, and it's implementing interface IFoo. This is (or used to be) legal. No, it is not and never was legal. Interfaces depend on runtime support

Re: [Vala] Vala thinks uint32 constant is int64

2010-11-25 Thread Jan Hudec
On Tue, Nov 23, 2010 at 18:36:40 -0800, Evan Nemerson wrote: On Wed, 2010-11-24 at 02:56 +0100, Jaroslav Šmíd wrote: Anyway, any chance that vala will switch to size_t (or at least intptr_t or ptrdiff_t (which is standard defined type for pointer difference)) from int for array indexing

Re: [Vala] BUFSIZ

2010-11-24 Thread Jan Hudec
On Wed, Nov 24, 2010 at 10:17:37 +0800, Ervin wrote: How can i use BUFSIZ from stdio.h? Just declare it extern somewhere. I believe namespace Posix { [CCode(cname = BUFSIZ, cheader_filename = stdio.h)] public extern const int BUFSIZ; } should do the trick. --

Re: [Vala] Combining async methods with external processes

2010-11-19 Thread Jan Hudec
On Fri, Nov 19, 2010 at 13:25:11 +0100, pancake wrote: you are using coroutines which are not designed to run stuff in background. coroutines are designed to run collaborative code which hangs if one of the parts doesn't pass the token when necessary. You have to use threads, or an idle

Re: [Vala] Define constant at compile time

2010-11-17 Thread Jan Hudec
On Tue, Nov 16, 2010 at 12:28:23 -0800, Anatol Pomozov wrote: But what if you want to change the real constant value at the compile-time? A classical example is DEBUG vs OPTIMIZED mode. During development I want to log of information to stdout, like this: if (DEBUG) { stdout.printf(User

Re: [Vala] Define constant at compile time

2010-11-16 Thread Jan Hudec
On Tue, Nov 16, 2010 at 18:36:07 +0100, Andrea Corbellini wrote: I want to specify the constant UI_FILE at compile time, but I don't know how to do that. In C I would write something like that: #ifndef UI_FILE #define UI_FILE default-path.xml #endif and then I would call gcc with

Re: [Vala] Define constant at compile time

2010-11-16 Thread Jan Hudec
On Tue, Nov 16, 2010 at 18:51:12 +0100, Günther Wutz wrote: It is possible to use cpp as Preprocessor. I'm working on a wrapper-program to combine cpp and give it valac to compile. The easiest way i found actually. Sorry. That's an extremely bad idea for most cases. The easiest way is to tell

Re: [Vala] gobject-introspect vs gir

2010-11-16 Thread Jan Hudec
On Tue, Nov 16, 2010 at 12:46:26 -0800, Anatol Pomozov wrote: http://live.gnome.org/Vala/Bindings page recommends 2-step vapi generation 1) Generate *.gi file using gen-introspect tool. It works for glib-style code. 2) Generate vapi file using vapigen tool Both tools are located in

Re: [Vala] Blitzen: A Vala Application Server

2010-11-14 Thread Jan Hudec
On Sun, Nov 14, 2010 at 15:30:29 +0100, pancake wrote: On Sun, 14 Nov 2010 11:22:37 + (UTC) Samuel CUELLA samuel.cue...@supinfo.com wrote: For the moment, the repository is not accessible from the internet. I'll import it into the sourceforge subversion service when I have time. [...]

Re: [Vala] Do you think that re-use web-based library in client side framework?

2010-11-06 Thread Jan Hudec
On Tue, Nov 02, 2010 at 21:48:21 +0900, san hoi wrote: I try to use python library in genie, (I choose simply process kick aproach...) and so I face two problem. 1. equivarent code in genie that os.poppen(python output_token_value.py) 2. definition style infomation in genie (from

Re: [Vala] Chunking a file in multiple chunks

2010-11-06 Thread Jan Hudec
On Thu, Nov 04, 2010 at 20:24:21 -0500, Guillaume Viguier wrote: Hi, I'm totally new to the Vala language, so there might be something obvious I'm missing. I'm trying to chunk a file into different chunks of 500 k (in order to send it over the network) and then calculate its md5sum (to send

Re: [Vala] g-ir-compiler compatibility with valac generated gir files

2010-10-13 Thread Jan Hudec
On Tue, Oct 12, 2010 at 14:39:39 -0700, Evan Nemerson wrote: On Tue, 2010-10-12 at 13:15 -0700, Nigel Griffin wrote: Hi, I'm using the latest g-ir-compiler g-object-introspection's git repositoty. However, even with a gir file generated from a minimal vala class causes g-ir-compiler

Re: [Vala] Genie syntax for connect

2010-10-13 Thread Jan Hudec
On Wed, Oct 13, 2010 at 11:31:09 +0200, Nicolas wrote: destroy.connect(Gtk.main_quit) spin_box.value_changed.connect(spinbox_value) slider.value_changed.connect (slider_value) button.clicked.connect(Gtk.main_quit) I also update the [Genie] Synchronizing

Re: [Vala] Two small new features

2010-10-04 Thread Jan Hudec
On Wed, Sep 29, 2010 at 00:42:55 +1000, Fredderic Unpenstein wrote: On 28 September 2010 21:19, Julian Andres Klode j...@jak-linux.org wrote: On Mo, 2010-09-27 at 02:55 +0200, Frederik Sdun wrote: This is just for convinience, for the not unusual case of: if (args.length 0)    

Re: [Vala] Dbus properies notifications

2010-09-22 Thread Jan Hudec
Hello, On Wed, Sep 22, 2010 at 12:00:40 +0200, tetete wrote: Hello Is there a possibility to get notifications of changed dbus server properties on the client? I guess there is some on board vala way of doing this. serverobject.notify.connect( (s,p)={print(%s\n,p.name);}); is not working.

Re: [Vala] Genie xmlrpc-c bindings test

2010-09-14 Thread Jan Hudec
On Tue, Sep 14, 2010 at 20:00:58 +1200, Phil Daintree wrote: Thanks for taking a look Evan If that is the case, then adding [CCode (ref_function_void = true)] to the class should do the trick/ I see a lot of these sorts of lines in the XML-RPC-C bindings of pancake's and since

Re: [Vala] mysql bindings in genie

2010-09-11 Thread Jan Hudec
On Fri, Sep 10, 2010 at 21:03:44 +1200, Phil Daintree wrote: # valac --pkg=mysql mysqltest.gs /tmp/ccumEU4F.o: In function `_vala_main': mysqltest.vala.c:(.text+0xb6): undefined reference to `mysql_init' mysqltest.vala.c:(.text+0xca): undefined reference to `mysql_close'

Re: [Vala] About sockets

2010-08-29 Thread Jan Hudec
On Fri, Aug 27, 2010 at 15:47:31 +0200, Leoncio Gil wrote: I am making a local server that can manage the works without configure the IP on the clients, thanks to broadcast. But I have a problem. I have make a Python test app, but I don't found any equivalence of [setsockopt] to set

Re: [Vala] [ANNOUNCE] Vala 0.9.6 - Compiler for the GObject type system

2010-08-27 Thread Jan Hudec
? As Jan Hudec mentions so loudly: ...libtool is supposed to generate appropriate -rpath option to ld based on path it has recorded in the .la file ... Well, because you are installing to a prefix that is mentioned in /etc/ld.so.conf. And it is only supposed to set rpath if it wasn't. In the standard

Re: [Vala] [ANNOUNCE] Vala 0.9.6 - Compiler for the GObject type system

2010-08-21 Thread Jan Hudec
On Wed, Aug 18, 2010 at 23:11:26 +0200, JM wrote: Is it really the solution to manually set LD_LIBRARY_PATH every time? This is not recommended from various sources (e.g. http://linuxmafia.com/faq/Admin/ld-lib-path.html) It's not recommended for a reason. You really shouldn't. Also this

Re: [Vala] [ANNOUNCE] Vala 0.9.6 - Compiler for the GObject type system

2010-08-21 Thread Jan Hudec
On Wed, Aug 18, 2010 at 22:54:35 +0200, Nicolas Joseph wrote: By default, /usr/local/lib isn't in LD_LIBRARY_PATH: Nothing is in LD_LIBRARY_PATH by default and it better stays that way. You meant /etc/ld.so.conf, didn't you? Now damn sure /usr/local/lib *IS* in /etc/ld.so.conf by default (at

Re: [Vala] _get_type() and G_GNUC_CONST

2010-08-21 Thread Jan Hudec
On Wed, Aug 18, 2010 at 22:43:27 +0200, Aleksander Wabik wrote: In glib doc for G_GNUC_CONST macro: A const function doesn't examine any values except its parameters, and has no effects except its return value. In 10-years-old mail:

Re: [Vala] Access the klass parameter of a class_init() function in vala with static construct

2010-08-09 Thread Jan Hudec
On Sat, Jul 31, 2010 at 11:30:19 -0700, Evan Nemerson wrote: On Sat, 2010-07-31 at 17:59 +0200, Sébastien Wilmet wrote: Hello! What I want to do is to implement a GtkAction derived class which sets GtkActionClass:toolbar_item_type to GTK_TYPE_MENU_TOOL_BUTTON in its class_init

Re: [Vala] error: too many arguments to function

2010-07-22 Thread Jan Hudec
in the Hildon.WizardDialogPageFunc declaration either. The C function has it, but it's used to pass the invocant if passing method or the closure if you pass closure. -- - Jan Hudec b...@ucw.cz ___ vala-list mailing list vala-list

Re: [Vala] naming issue with abstract async functions

2010-07-10 Thread Jan Hudec
On Thu, Jul 08, 2010 at 18:41:40 +0200, JM wrote: Hello I have the following programm: public abstract class AbcAbstr : GLib.Object { public abstract async void test_async(); } public class ABC : AbcAbstr { public override async void test_async() { print(test2\n); }

Re: [Vala] workaround for assignment from incompatible pointer type

2010-07-10 Thread Jan Hudec
On Sat, Jul 10, 2010 at 02:29:16 +, James Moschou wrote: Hello, I'm trying to subclass Clutter.Actor, I have: public override void allocate (ActorBox box, AllocationFlags flags) {... which generates: static void text_view_real_allocate (ClutterActor* base, ClutterActorBox* box,

Re: [Vala] How to abort sorting in Gee.ArrayList?

2010-07-05 Thread Jan Hudec
On Sun, Jun 27, 2010 at 15:25:34 +0200, synkro wrote: Most sorting algorithms don't like being aborted. Aborting sorting also means that not perfectly sorted data is acceptable. I suggest bubble sort, it's not fast but easily aborted. Have you noticed the *millions of entries* statement? Than

Re: [Vala] Interfaces and Mixins

2010-06-19 Thread Jan Hudec
On Tue, Jun 15, 2010 at 16:09:06 -0700, Robert Powell wrote: On Tue, Jun 15, 2010 at 4:00 PM, tecywiz121 tecywiz...@hotmail.com wrote: Actually in my other interfaces, it works fine. I'm just not sure if I'm allowed to override a method declared in Flushable in Entity. Do your other

Re: [Vala] Rules for updating generated C files

2010-06-09 Thread Jan Hudec
On Tue, Jun 08, 2010 at 22:58:09 +0200, Jürg Billeter wrote: On Tue, 2010-06-08 at 13:36 -0700, Robert Powell wrote: You snipped the important bit For this simple system, it would be easy enough to update the makefile to watch for this dependency. It was meant to illuminate the fact that

Re: [Vala] Rules for updating generated C files

2010-06-08 Thread Jan Hudec
On Thu, Jun 03, 2010 at 14:13:01 -0700, Robert Powell wrote: What is going on here --- We have a library BaseClass.vapi that is generated from BaseClass.vala. This defines the class BaseClass. We also have Derived.vala, which defines a class that derives from

Re: [Vala] Vala GIO sample remark

2010-05-14 Thread Jan Hudec
--enable-experimental-non-null option is used it will not compile - the return value isn't nullable and cannot be compared to null. Than that's a bug in the vapi. -- - Jan Hudec b...@ucw.cz ___ vala-list mailing

Re: [Vala] MySQL access from vala

2010-05-06 Thread Jan Hudec
On Thu, May 06, 2010 at 20:51:07 +0300, Ndubi Abenga wrote: Field[] fields = result.fetch_fields (); [...] mysql_connection.c:179: error: too many arguments to function ‘mysql_fetch_fields’ The offending C code is this right here: *179:*fields = (_tmp2_ =

Re: [Vala] Singleton and reference count

2010-04-29 Thread Jan Hudec
, they are not needed for that either. So IMHO supporting them would just promote unreliable code and is thus not worth doing. -- - Jan Hudec b...@ucw.cz ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org

Re: [Vala] Generating bindings for non-GLib/GObject based API

2010-04-29 Thread Jan Hudec
On Sun, Apr 25, 2010 at 11:46:17 +0200, Michael Wild wrote: On 23. Apr, 2010, at 22:29 , Jan Hudec wrote: Actually I believe [Compact] [CCode (cname = void, ...)] class Thing ... should work. It will give you void * passed around, so it's some kind of pointer and C

Re: [Vala] Singleton and reference count

2010-04-29 Thread Jan Hudec
On Thu, Apr 29, 2010 at 13:53:40 -0400, Sam Wilson wrote: On Thu, 2010-04-29 at 18:55 +0200, Jan Hudec wrote: Hello, On Wed, April 28, 2010 13:46, Jan Niklas Hasse wrote: On Wed, Apr 28, 2010 at 11:31 AM, pancake panc...@youterm.com wrote: On Apr 28, 2010, at 10:24 AM, Jan Niklas

Re: [Vala] GtkSourceCompletion segfault

2010-04-26 Thread Jan Hudec
On Mon, Apr 26, 2010 at 14:31:35 +0200, Nicolas Joseph wrote: Hello, I test GtkSourceCompletion (include in GtkSourceView 2.10) and I rewrite in vala this example: http://git.gnome.org/browse/gtksourceview/tree/tests/test-completion.c?id=GTKSOURCEVIEW_2_10_0 I have a bug for add custom

Re: [Vala] Generating bindings for non-GLib/GObject based API

2010-04-23 Thread Jan Hudec
On Fri, Apr 23, 2010 at 09:36:18 +0200, Michael Wild wrote: Another thing where I'm not sure how to best solve it: The basic C-type I'm using is a typedef to a pointer whose base-type is implementation dependent (i.e. unknown). E.g. like this: typedef struct unknown_type* Thing; Now, in

Re: [Vala] Generating bindings for non-GLib/GObject based API

2010-04-22 Thread Jan Hudec
On Thu, Apr 22, 2010 at 11:47:21 +0200, Michael Wild wrote: 1) Constructor function: Say I would like to use a C function as the constructor for a class (as e.g. newwin is used in curses.vapi). However, that C function does not return the allocated and initialized object in the return value,

Re: [Vala] I need to print Gdk.NativeWindow as an actual value, how do I print it?

2010-04-22 Thread Jan Hudec
On Thu, Apr 22, 2010 at 14:54:19 +0300, Arkadi Viner wrote: By the way, in terminal it prints out: (valide:3060): Gtk-CRITICAL **: gtk_socket_get_id: assertion `GTK_WIDGET_ANCHORED (socket)' failed Socket ID=0 The GTK_WIDGET_ANCHORED is checking whether there is a top-level window for this

Re: [Vala] GObject-introspection and vapi

2010-04-18 Thread Jan Hudec
is not able to express composite (array and delegate) arguments in non-standard order (as can be done with CCode attribute in vapi), but I can't think of anything when not using CCode attributes. -- - Jan Hudec b...@ucw.cz

Re: [Vala] ellipsis forwarding

2010-04-17 Thread Jan Hudec
On Fri, Apr 16, 2010 at 14:27:24 +0200, JM wrote: Hello Is there anybody who made has some experiences with ellipsis? I wrote the following code: void add_vals(string first_property_name, ...) { var l = va_list(); print(\n1:\t%s-%s\n\t%s-%s\n\n,first_property_name,

Re: [Vala] Compile failed on .gir file

2010-04-15 Thread Jan Hudec
On Wed, Apr 14, 2010 at 22:52:01 +0200, Geert Jordaens wrote: On Wed, Apr 14, 2010 at 18:18:33 +0200, Geert Jordaens wrote: Hello, I've tried to compile folowing code : /* valac -o G --pkg Gee-1.0 G.vala */ To fix some of the errors with the gir file I changed the

Re: [Vala] Houston we have a problem(gtk.builder signals not functioning)

2010-04-08 Thread Jan Hudec
Hello, On Thu, Apr 08, 2010 at 11:30:00 -0700, Karl Zollner wrote: My first post here, please let me know if there is something wrong with how this email appears, don't want to be guilty of top-posting or such, so kind words of advice appreciated. Sorry to say, but there is something wrong.

Re: [Vala] follow up to Houston we have a problem

2010-04-08 Thread Jan Hudec
On Thu, Apr 08, 2010 at 11:50:40 -0700, Karl Zollner wrote: Ok shoot me. In my rush to be helpful I probably have cause some wasted time. You do realize that since this is a follow-up, it should have really been one. I.e. created by Reply All on your original post. Do you? You know, some

Re: [Vala] How to check what a Gee.List contains

2010-04-05 Thread Jan Hudec
On Sun, Apr 04, 2010 at 10:09:24 -0700, Tristin Celestin wrote: Is there a means to figure out what kinds of variables a Gee.List stores? The following doesn't work because if I call mystery_list.get(0), I get the compiler error: has no member named ‘g_destroy_func’. Hm, that's bad compiler

Re: [Vala] Fail to generate C code for following vala code, is this a bug?

2010-03-28 Thread Jan Hudec
On Sat, Mar 27, 2010 at 19:28:30 +0800, PCMan wrote: Thanks you guys for the help. I use my own modified version of gio.vapi and remove the *_finish functions from those interfaces. Then, it works. Although I don't know why it works. Thank you again. Because they shouldn't be there. The

Re: [Vala] Fail to generate C code for following vala code, is this a bug?

2010-03-26 Thread Jan Hudec
On Sat, Mar 27, 2010 at 03:57:26 +0800, PCMan wrote: So, the problem is that the function return values are falsely marked as unowned in the VAPI. I reported a bug for it at https://bugzilla.gnome.org/show_bug.cgi?id=614044 However, with Vala, how can I make vala methods return a newly

Re: [Vala] Problems with D-Bus and signals, classes and interfaces.

2010-03-23 Thread Jan Hudec
On Mon, Mar 22, 2010 at 14:55:15 +0100, Fabian Deutsch wrote: Hello, during the last two days I tried to figure out how to use signals with dbus. There were a couple of problems, finally a testcase was created, showing that signals are woking fine:

Re: [Vala] Binding an OpenGL function with GLchar* parameters

2010-03-14 Thread Jan Hudec
On Sat, Mar 13, 2010 at 12:14:23 -0800, Tristin Celestin wrote: If I don't include the out specifier, how will glGetActiveAttrib change the value of name? Whenever you pass an object to some function, without 'out', the function can't give you another object, but it can change the properties of

Re: [Vala] Newbie Compile Time Errors

2010-03-13 Thread Jan Hudec
On Fri, Mar 12, 2010 at 17:17:25 -0700, Jeff Cave wrote: Anyway, I think it's better to install the library. One of the problems is that the library is not even at version 0.0.2, that means its going to change frequently. I was actually hoping to use it as a learning tool for building

Re: [Vala] Can't compile ValaIde from source...

2010-03-13 Thread Jan Hudec
On Fri, Mar 12, 2010 at 18:24:37 +0200, Arkadi Viner wrote: When I try to compile ValaIDE from source, It writes me: ark...@arkadi-laptop:~/Projects/valide-0.6.1$ ./waf configure Checking for program gcc : ok /usr/bin/gcc Checking for program cpp : ok

Re: [Vala] [Genie] emulate a mouse click to trigger widget changes

2010-03-10 Thread Jan Hudec
) You need to pass 'this' as argument to builder.connect_signals, so it can get passed to the handler. 3) Than just call nbMain.set_current_page(4) in the handler. -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing

Re: [Vala] making a running a program as a child inside my program's widget.

2010-03-06 Thread Jan Hudec
On Sat, Mar 06, 2010 at 12:23:26 +0200, Arkadi Viner wrote: I don't find any example or code for gladeui on the internet for what I need so I think it's much easier to go with the socket and the plug It would probably be a bit easier, but the result will be bigger bit more ugly. That's

Re: [Vala] Does vala provide syntactic sugar for weak references that know when its peer has been nulled?

2010-03-05 Thread Jan Hudec
On Thu, March 4, 2010 13:23, Phil Housley wrote: On 3 March 2010 23:17, Jan Hudec b...@ucw.cz wrote: On Wed, Mar 03, 2010 at 15:22:59 -0600, Sandino Flores Moreno wrote: Is it possible for a weak ref to know when its peer object has been deleted (and then assigned to null)? By the way, note

Re: [Vala] making a running a program as a child inside my program's widget.

2010-03-05 Thread Jan Hudec
of widgets, so you can embed Qt applications in the same way. However while Gtk supports Socket and Plug also on Windows, Qt only supports them on X11. -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list

Re: [Vala] Does vala provide syntactic sugar for weak references that know when its peer has been nulled?

2010-03-05 Thread Jan Hudec
On Wed, Mar 03, 2010 at 15:22:59 -0600, Sandino Flores Moreno wrote: Hello. Is it possible for a weak ref to know when its peer object has been deleted (and then assigned to null)? Because, suppose you have a weak reference, then the real object is deleted. So your weak reference should be

Re: [Vala] Does vala provide syntactic sugar for weak references that know when its peer has been nulled?

2010-03-03 Thread Jan Hudec
On Wed, Mar 03, 2010 at 15:22:59 -0600, Sandino Flores Moreno wrote: Is it possible for a weak ref to know when its peer object has been deleted (and then assigned to null)? Object is not assigned null. Variable is. Anyway, I believe it still is the plan (and reason why the current kind is

Re: [Vala] Using OpenGL 3.0 from Vala

2010-02-22 Thread Jan Hudec
On Sun, Feb 21, 2010 at 18:30:31 -0800, Tristin Celestin wrote: I am trying to use OpenGL 3.0 from Vala, but I notice that only up to OpenGL 1.3 is defined in the .vapi file. The methods relevant to me are defined in GL/glext.h. How would I access the functions declared there? Is it enough

Re: [Vala] sorted keys from a hash

2010-02-14 Thread Jan Hudec
On Sat, Feb 13, 2010 at 21:59:20 +0530, Martin DeMello wrote: On Sat, Feb 13, 2010 at 3:39 AM, Jan Hudec b...@ucw.cz wrote: On Sat, Feb 13, 2010 at 02:54:21 +0530, Martin DeMello wrote: What's the most efficient (in terms of speed) way to iterate over a hash in sorted order of the keys

Re: [Vala] Problem while creating a vapi file for a typedef'd pointer.

2010-02-12 Thread Jan Hudec
On Fri, Feb 12, 2010 at 17:40:16 +0100, Abderrahim Kitouni wrote: Hi, Geoffrey Blackman wrote: Hi, I'm attempting to create a vapi file for Verilog VPI and have run into a problem with a opaque pointer type. Different implementations of VPI define the type vpiHandle differently. Two

Re: [Vala] using libgee from c

2010-02-12 Thread Jan Hudec
Hello, On Sat, Feb 13, 2010 at 01:28:21 +0530, Martin DeMello wrote: Other than reading gee.h directly, is there any documentation on the C api to libgee? The conversion between Vala and C api is straightforward. So you can simply look at the documentation at www.valadoc.org and learn to know

Re: [Vala] sorted keys from a hash

2010-02-12 Thread Jan Hudec
On Sat, Feb 13, 2010 at 02:54:21 +0530, Martin DeMello wrote: What's the most efficient (in terms of speed) way to iterate over a hash in sorted order of the keys? The keys are strings. To use a balanced tree. Hash can only ever be iterated in the hash order, which is fixed but pseudo-random.

Re: [Vala] Vala - generates code at runtime

2010-02-11 Thread Jan Hudec
On Tue, Feb 09, 2010 at 23:29:39 +0100, jideel wrote: It was quite seductive to be able to code as easily as with C#/Java while having C performance/size. If you have most of the code in a compiled library (that can be written in Vala or C or C++) and just generate a bit of glue to put it

Re: [Vala] Generated code, GTK signals and prefixes.

2010-02-11 Thread Jan Hudec
On Wed, Feb 10, 2010 at 23:36:23 -0200, Carlos Eduardo da Fonseca wrote: Hello everyone, is there any way to connect signals from a GtkBuilder XML without writing the Vala generated function name? For example: namespace MyNamespace { class MyClass { static void my_handler(Widget

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread Jan Hudec
While this is indeed correct workaround, the Hildon binding should probably be updated (so you get type-checking from the compiler). -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list@gnome.org http

Re: [Vala] Generating bindings for classes defined over multiple packages

2010-02-09 Thread Jan Hudec
On Mon, Feb 08, 2010 at 17:13:43 -0500, Gabe Gorelick-Feldman wrote: Thanks, but at that point it's easier just to do the binding by hand. I was trying to come up with a process that could integrate well with the build system, that way the library can be built and bindings can be

Re: [Vala] Vala - generates code at runtime

2010-02-09 Thread Jan Hudec
On Tue, Feb 09, 2010 at 15:36:56 +0100, jideel wrote: I'm wondering what would be the right way to generates code/classes at runtime, and reload it into the running program. Well, is Vala the right tool than? It's a completely static language which needs to be compiled with C compiler and that

[Vala] [RFC] Extension methods (Re: maemo5 hildon input mode)

2010-02-09 Thread Jan Hudec
(...); } [Extend] class Widnow { ... set_progress_indicator(...); } } and -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] [Genie] static dict

2010-01-30 Thread Jan Hudec
On Fri, Jan 29, 2010 at 17:03:06 -0500, Arc Riley wrote: struct rgba r : float g : float b : float a : float class Color : Object _map : static dict of string,rgba = new dict of string,rgba _map[white] = {1.0f, 1.0f, 1.0f, 1.0f} _map[red] = {1.0f, 0.0f, 0.0f, 1.0f}

Re: [Vala] signal handling in gui thread

2010-01-30 Thread Jan Hudec
On Sat, Jan 30, 2010 at 02:20:13 +0100, Jiří Zárevúcky wrote: Nor Jaidi Tuah píše v So 30. 01. 2010 v 09:07 +0800: [...] So, I emulate gtkmm's Dispatcher by replacing this: a_signal.connect ((arg) = { things_to_do (); }); with: a_signal.connect ((arg) = {

Re: [Vala] Proper Syntax for Array of Nullable Strings

2010-01-21 Thread Jan Hudec
On Thu, Jan 21, 2010 at 01:04:47 +0100, Andrés G. Aragoneses wrote: El 20/01/10 23:42, Sam Wilson escribió: Is it possible to define a nullable array of nullable strings? How? However, I don't agree with Frederik here, because I think you cannot and vala shouldn't let you in the future (in

Re: [Vala] Threads and closures problem

2010-01-15 Thread Jan Hudec
of g_thread_create with destroy notify, but of course it will take time before it gets to a stable release. -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman

Re: [Vala] Threads and closures problem

2010-01-15 Thread Jan Hudec
(); return 0; } } // valac --thread hhh.vala I get: $./hhh in thread : test in thread : (null) Ideas? Regards, JĂśrn -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list@gnome.org http

Re: [Vala] Question about namespaces..

2010-01-12 Thread Jan Hudec
On Wed, Jan 06, 2010 at 12:22:49 -0700, Shawn Ferris wrote: On Wed, 2010-01-06 at 07:51 +0100, Jan Hudec wrote: It already exists. It's called a class! Of course I know what a class is, and I understand (mostly) what they're capable of. The problem with a separate class to manage

Re: [Vala] static string variable is empty!

2010-01-05 Thread Jan Hudec
instead of static one. public class Global { class string dataDir = whatever; } -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Question about namespaces..

2010-01-05 Thread Jan Hudec
Namespaces are useful as they are and better stay that way. All you want is already provided by classes (and their metaobjects). -- - Jan Hudec b...@ucw.cz ___ Vala-list mailing list Vala-list@gnome.org http

Re: [Vala] [Genie] multi-line structs

2010-01-04 Thread Jan Hudec
On Mon, Jan 04, 2010 at 08:25:06 -0500, Jamie McCracken wrote: On Mon, 2010-01-04 at 02:07 -0500, Arc Riley wrote: A syntax quirk that I found a bit obnoxious: const entries : array of OptionEntry = { \ { config, 'c', OptionFlags.IN_MAIN, \ OptionArg.FILENAME, ref config, \

Re: [Vala] Does Vala.HashMap works ?

2010-01-03 Thread Jan Hudec
On Mon, Jan 04, 2010 at 14:05:34 +0800, G.S.Alex wrote: this code is almost the same with the libgee example. but the value haspmap will always be 0 for int , (null) for string. --

Re: [Vala] How to chain up to parent constructor

2010-01-02 Thread Jan Hudec
On Fri, Jan 01, 2010 at 12:02:31 +0100, Jiří Zárevúcky wrote: Dov Grobgeld píše v Pá 01. 01. 2010 v 12:13 +0200: How do you create a transparent inheritance? E.g. I would like to inherit from Gtk.RadioToolButton and support all its methods and constructors. But when creating the proxy

Re: [Vala] How to make the CCode contains the local header ?

2010-01-02 Thread Jan Hudec
On Fri, Jan 01, 2010 at 18:25:59 +0800, G.S.Alex wrote: When i write a vapi file to use some c code files , i use the cheader_filename attribute to include the header file. But the default generated code will use the system headers. For example : [CCode(cheader_filename = case.h]

Re: [Vala] bug in gnome-keyring binding?

2010-01-02 Thread Jan Hudec
On Fri, Jan 01, 2010 at 18:47:57 +, Scot McSweeney-Roberts wrote: As I'm new to Vala, I thought I'd ask first before filing a bug report as I could be doing something wrong. I'm trying to use the gnome_keyring_find_items_sync  function. Vala's binding is public static

Re: [Vala] Idle.add lambda function with local variable

2009-12-28 Thread Jan Hudec
On Sun, Dec 27, 2009 at 09:58:52 -0800, Geert Jan wrote: Ok I messed up that example, sorry. Obviously in my real project I do create a main loop. Don't have time now, but unless someone can help me despite my bad example I'll post the real code from my project later. Well, the point is not

Re: [Vala] yajl vala binding?

2009-12-09 Thread Jan Hudec
On Wed, Dec 09, 2009 at 10:21:45 +0100, Victor Manuel Jáquez Leal wrote: On Sat, Dec 5, 2009 at 5:24 AM, san hoi hoisa...@gmail.com wrote: I'm search yajl binding. but i cannot find vala's binding... umm, Who do you wrap yajl api in vapi files? I don't know if it fits you, but I guess it'd

Re: [Vala] Libgee problem

2009-12-09 Thread Jan Hudec
On Wed, Dec 09, 2009 at 19:16:41 +0100, Alessandro Pellizzari wrote: Il giorno mer, 09/12/2009 alle 11.30 +0100, Nicolas ha scritto: var map = new HashMap double, double (); Return this error: error: `double' is not a supported generic type argument, use `?' to box value types

  1   2   >