Re: [Vala] Newbie need help

2018-10-23 Thread Tal Hadad via vala-list
valac - The standard Vala compiler Vala - A programming language. (Description, Specification,...) It's as same as this relationship: GCC - A free compiler for C C - A programming language. (Description, Specification,...) מאת: wolfgang.ma...@kabelmail.de נשלח: יום שלישי, 23 באוקטובר, 10:51

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

2014-07-27 Thread Tal Hadad
* Support explicit interface method implementation.I asked about this feature when Vala version was about 0.10. I'm glad Vala team haven't forgotten this feature! Tal Date: Wed, 23 Jul 2014 16:57:33 +0200 From: lethalma...@gmail.com To: vala-list@gnome.org Subject: Re: [Vala] [ANNOUNCE]

Re: [Vala] New tiny helper for unit testing

2014-06-25 Thread Tal Hadad
Looks very good! Keep going Date: Fri, 13 Jun 2014 15:58:02 +0900 From: yusuke.ishida@gmail.com To: vala-list@gnome.org Subject: [Vala] New tiny helper for unit testing Hi all, I've create a new tiny helper 'vtth' for unit testing. Please try it. https://github.com/y-ishida/vtth

Re: [Vala] Change in 0.23.1 for array ownership and .length parameter

2014-01-09 Thread Tal Hadad
-list@gnome.org That would be a memory leak. On Thu, Jan 9, 2014 at 7:01 PM, Tal Hadad tal...@hotmail.com wrote: What about: if (foo) { bar = (owned) ar; } // what now This behavior is confusing. It would be unowned, even if in if statement, just like I suggest. Tal Date

Re: [Vala] Change in 0.23.1 for array ownership and .length parameter

2014-01-06 Thread Tal Hadad
This case trigger me a question I wanted to ask before. Why transforming ownership is nulling the original variable? Instead of nulling, maybe just change variable to behave as unowned. You might say that there is a problem in my solution, like this code: uint8[] ar = new uint8[10]; if

Re: [Vala] vala friendly atomic pointer

2013-12-19 Thread Tal Hadad
http://www.valadoc.org/#!api=gobject-2.0/GLib.WeakRef This is a simple solution thanks to the good design of GObject. Tal From: norjaidi.t...@ubd.edu.bn To: vala-list@gnome.org Date: Thu, 19 Dec 2013 08:59:44 +0800 Subject: [Vala] vala friendly atomic pointer Dear all, I want to

Re: [Vala] getting the valadoc.org documentation on a local server

2013-12-16 Thread Tal Hadad
recall why it didn't work for me, nor do I remember which flags I used with wget. I am currently trying again with 'wget -rk http://valadoc.org' jezra On Sat, 14 Dec 2013 21:39:39 +0200 Tal Hadad tal...@hotmail.com wrote: Wget can clone an entire HTTP website(even convert links

Re: [Vala] getting the valadoc.org documentation on a local server

2013-12-14 Thread Tal Hadad
Wget can clone an entire HTTP website(even convert links and images to off-line addresses). Read: http://www.linuxjournal.com/content/downloading-entire-web-site-wget The alternative is to build all packages with vapi-gen, doesn't really recommended for you :-) Tal Date: Sat, 14 Dec 2013

Re: [Vala] Properties == GObject properties?

2013-10-11 Thread Tal Hadad
Hi, On Fri, Oct 11, 2013 at 9:34 AM, Tal Hadad tal...@hotmail.com wrote: First time I hear not all properties are GObject. Suppose I have this property: ... public int 1numbered { get; set; } ... This is not a GObject property, since it's started with a number. You can't

Re: [Vala] Properties == GObject properties?

2013-10-11 Thread Tal Hadad
To: tal...@hotmail.com CC: vala-list@gnome.org 2013/10/11 Tal Hadad tal...@hotmail.com Hi, On Fri, Oct 11, 2013 at 9:34 AM, Tal Hadad tal...@hotmail.com wrote: First time I hear not all properties are GObject. Suppose I have this property: ... public int 1numbered { get

Re: [Vala] Vala 0.22.0 - requiring instance of Class to access Class class-members.

2013-09-29 Thread Tal Hadad
Hello, This is the second time I've tried to post to the list, but I haven't seen my first attempt show up in the vala-list archive yet, so I thought I would resend, just in case. I'm still learning my way around vala so I may be doing something wrong, but according to the docs at

Re: [Vala] A struct in a vapi file with undefined contents?

2013-07-30 Thread Tal Hadad
It's sounds like what you want is a compact class: [CCode (cname = FIT_CONVERT_STATE)] [Compact] public class a { } Compact class is better, since it's always treated like pointer. In struct you may accidentally copy memory(zero in your case) if you do a value assignment. Tal From:

[Vala] Vala should use g_slice for structures.

2013-04-15 Thread Tal Hadad
Hello all I've seen in my generated code, that Vala use g_slice for alloc. classes. But on structs, Vala use g_new0 and g_free. I think it should be also in structures dup and free funcs, for faster performance, even known struct duplicating isn't used a lot. Hope to hear your opinion. Tal

Re: [Vala] Vala to Android - Cairo

2013-04-01 Thread Tal Hadad
Very good results. But why the Android device is needed to be rooted? And is it possible to use OpenGLES in Vala there? Tal From: tarn...@tarnyko.net To: vala-list@gnome.org Date: Mon, 1 Apr 2013 06:10:40 +0200 Subject: Re: [Vala] Vala to Android - Cairo Hi people, Last message from

Re: [Vala] Autovala: new program for developers

2013-03-30 Thread Tal Hadad
This is sound very attractive, even I don't like CMake. I have a few question tough: 1. I've read autovala search autocratically for vala files. Can I disable this feature? Supposing I want to compile some file only on some condition, can it be possible? 2. Can a C files be used with Vala? Like

Re: [Vala] Vala to Android

2013-03-20 Thread Tal Hadad
Very good! someone had to break his mind until this would success, and you and many others volunteered... The main problem was GObject and GLib, I think it would interest people in other GNOME mailing list. I recently also tried myself to find ways to use Vala in Android, and you prove it

[Vala] Using is keyword yeilds error in Valac 0.18.1

2013-03-11 Thread Tal Hadad
Using is keyword yeilds error in Valac 0.18.1. For example, if (e is Error) Gives me this error: error: macro G_TYPE_CHECK_INSTANCE_TYPE requires 2 arguments, but only 1 given In 0.16, it works 100% Can you fix this please? Tal

Re: [Vala] regarding Gtk.Application managing a single instance app

2013-02-02 Thread Tal Hadad
First, note you can use GLib.Application in GLib, you don't have to use Gtk.Aplication(it's inherit from the first): http://developer.gnome.org/gio/unstable/GApplication.html There, you can see example 19A, where it shows you how to activate an Action, using Application class. The action is

Re: [Vala] Vala dynamic array with double []

2013-01-27 Thread Tal Hadad
This is kinda tricky. First, take a look in Wikipedia: http://en.wikipedia.org/wiki/Dynamic_array The bad way, is to use resize method every time: double[] a = new double[0]; for (int i=0;ilength;i++) { a.resize(i); a[i]=num; } (Never code like this, I just showed you what happens) Every

[Vala] Few bugs in Xnoise

2013-01-22 Thread Tal Hadad
After testing the new version, I have few bugs to report(sorry for being late): 1. Adding a new source directory to library should be async. It means that after adding music directory, the user could continue and add another directory, not waiting for finishing scanning. 2. When (de/)activating

Re: [Vala] Defining new virtual signal is possible, but overring it isn't.

2012-12-17 Thread Tal Hadad
signal is possible,but overring it isn't. 2012/12/17 Tal Hadad tal...@hotmail.com public class Foo : GLib.Object { public virtual void func() { } internal static void bug () { new Bar (); } } public class Bar : Foo { public override void func

[Vala] Defining new virtual signal is possible, but overring it isn't.

2012-12-15 Thread Tal Hadad
When I try to: public class A : GLib.Object { public virtual signal void func () {} } public class B : A { public override void func () {} } I get an error from Valac: error: B.func: no suitable method found to override I'm using Vala 0.16.1 I think that this is a critical bug in Vala,

Re: [Vala] Should be warning(maybe error) when method with [ReturnsModifiedPointer] is called from unowned variable

2012-11-08 Thread Tal Hadad
modifying works fine, but other seems to be broken (it is the same in both cases, modifying given_list or list). I won't be able to help you :( (btw, I use Gee for lists/arrays etc). Jarek 2012/11/6 Tal Hadad tal...@hotmail.com I'm sorry, the example I gave is bad. Forgot the unowned word. Example

Re: [Vala] Should be warning(maybe error) when method with [ReturnsModifiedPointer] is called from unowned variable

2012-11-06 Thread Tal Hadad
something. Could you describe the result you expect from the code you provided? Jarek 2012/11/4 Tal Hadad tal...@hotmail.com There should be warning(maybe error) when method with [ReturnsModifiedPointer] is called from unowned variable. Take a look on GLib.SList. The beginner programer(me too

[Vala] Should be warning(maybe error) when method with [ReturnsModifiedPointer] is called from unowned variable

2012-11-04 Thread Tal Hadad
There should be warning(maybe error) when method with [ReturnsModifiedPointer] is called from unowned variable. Take a look on GLib.SList. The beginner programer(me too) can be assign an unowned variable to the list, and remove items, but he don't know it shell update the owned pointer.

[Vala] Binding Bug in Atk.Util.add_global_event_listener

2012-10-04 Thread Tal Hadad
There is a bug in atk.vapi, in method: Atk.Util.add_global_event_listener The line is: public static uint add_global_event_listener (GLib.SignalEmissionHook listener, string event_type); But there should be a CCode attribute in first parameter(listener) saying has_target=false . There

[Vala] Fisrt start in ATK(bad)

2012-10-03 Thread Tal Hadad
I'm trying to get into the ATK API for reading GTK widgets text, but I my first try is not great. I've read this document: http://developer.gnome.org/accessibility-devel-guide/3.0/id232879.html.en Sadly, it is the most useful document for ATK client. I tried the first one, but with no luck.

Re: [Vala] GLib binding missing: GLib.Once and bit locking are missing

2012-09-30 Thread Tal Hadad
PM, Tal Hadad wrote: After looking on this page: http://developer.gnome.org/glib/2.31/glib-Threads.html I see that those useful thread-safe binding are missing: * GLib.Once namespace and its methods. * g_bit_lock, g_bit_try_lock and g_bit_unlock in GLib.AtomicInt * g_pointer_lock

[Vala] GLib binding missing: GLib.Once and bit locking are missing

2012-09-26 Thread Tal Hadad
After looking on this page: http://developer.gnome.org/glib/2.31/glib-Threads.html I see that those useful thread-safe binding are missing: * GLib.Once namespace and its methods. * g_bit_lock, g_bit_try_lock and g_bit_unlock in GLib.AtomicInt * g_pointer_lock, g_pointer_try_lock and

Re: [Vala] ANNOUNCE: ValaWinPKG for win32

2012-08-25 Thread Tal Hadad
It looks very good! Most .Net devs find Vala libraries installation difficult with windows(such as me). This software solve the problems(give Windows users the installation style they used to!). I have questions though: If I have mingw and install Vala and other libraries using MinGW(msys), can

[Vala] Volatile keyword in Vala(please answer)

2012-08-24 Thread Tal Hadad
Is volatile keyword supported in Vala? Is it planned? Few sources say it does, but testing showing it's not. I asked this question a month ago and no one replay. Does Jörg Biller include this in Vala? Tal ___

Re: [Vala] [xnoise] [Bug] Crash when attempt to play tracks

2012-08-15 Thread Tal Hadad
Am Dienstag, den 14.08.2012, 15:30 +0300 schrieb Tal Hadad: Thanks for fixing the first one. And about the second bug, I don't really understand the main_window.toggle_window_visbility method: public void toggle_window_visbility() { if(active_notifier != 0

Re: [Vala] Help! The method named 'XGetImage' is missing.

2012-08-15 Thread Tal Hadad
Until this binding will be fixed, you can use the extern word in your program: extern X.Image X.GetImage(params) extern int X.PutImage(params) If my definitions were wrong, write your own using the extern keyword. Date: Wed, 15 Aug 2012 22:41:17 +0800 From: ad...@heiher.info To:

Re: [Vala] How can I get information about vala gtk?

2012-08-14 Thread Tal Hadad
I'll give you the magic trick: Look at the examples and when you find some example interesting, start to twick the code. Only experience can truly teach you. It works for me, hope it will work for you. See for example, the GTK example: https://live.gnome.org/Vala/GTKSample I'll give you homework

Re: [Vala] Interfaces and asynchronous methods

2012-08-14 Thread Tal Hadad
out keyword in async method has a different approach. See the tutorial about async method: https://live.gnome.org/Vala/Tutorial#Asynchronous_Methods They is there an example that look similar to yours: async int fetch_webpage(string url, out string text) throws IOError { // Fetch a

Re: [Vala] How can I get information about vala gtk?

2012-08-14 Thread Tal Hadad
some control invisible, I need to catch double-mouse-click event and change one control to another and so one. Can somebody help me? 2012/8/14 Tal Hadad tal...@hotmail.com: I'll give you the magic trick: Look at the examples and when you find some example interesting, start to twick

Re: [Vala] How can I get information about vala gtk?

2012-08-14 Thread Tal Hadad
August 2012 14:37, Tal Hadad tal...@hotmail.com wrote: Thanks, it's really nice, but I have a few tasks already and can't find, how to solve it. For eample: I need to make some control invisible, Not quit sure what do you mean by control. Is it SpinButton? Entry? Menu? and so

Re: [Vala] Declare array of enumerated(enum) value size

2012-08-12 Thread Tal Hadad
Try this code: enum stats_parameters { #ifdef EMBEDED MAX_EVENTS=2 #else MAX_EVENTS=20 #endif } int statistics[stats_parameters.MAX_EVENTS]; int foo[stats_parameters.MAX_EVENTS]; int bar[stats_parameters.MAX_EVENTS];Vala enums must be used with the enum name. Yours, Tal Date: Sun, 12

[Vala] Volatile is supported or not?

2012-08-09 Thread Tal Hadad
I have to use volatile variables in my project. The alternative is to allocate a new memory slice and use this pointer, or disable optimizations. Currently, when I define a field, variable or parameter with volatile keyword, i get error, so I guess it's not supported yet. However, here[0] it's

[Vala] [Suggestion] New class attribute - Singleton

2012-07-21 Thread Tal Hadad
Currently, it is hard to create pure singleton in Vala. Sure, I can implicate myself get_instance() method and make all constructors private, but outside usage of the type could call g_object_new(type) and ruin it all. An example for this would be the libpeas plugin extensions registration(by

Re: [Vala] Seg fault when trying to pass args to gtk_init_check.

2012-07-18 Thread Tal Hadad
] Seg fault when trying to pass args to gtk_init_check. From: j...@bitron.ch To: tal...@hotmail.com CC: vala-list@gnome.org Date: Wed, 18 Jul 2012 16:38:08 +0200 Hi Tal, On Mon, 2012-07-16 at 20:27 +0300, Tal Hadad wrote: Ok I've explained my self wrong. The reason I use a pointer

[Vala] Seg fault when trying to pass args to gtk_init_check.

2012-07-16 Thread Tal Hadad
I use the libpeas plugin engine, and want to init gtk from the plugin registar method. I saved the main() args in static field in my library, and the plugin registar method looks like this: public void peas_register_types (ObjectModule module) { int* argsc; char*** argsv; argsv =

Re: [Vala] Seg fault when trying to pass args to gtk_init_check.

2012-07-16 Thread Tal Hadad
to gtk_init_check. From: j...@bitron.ch To: tal...@hotmail.com CC: vala-list@gnome.org Date: Mon, 16 Jul 2012 18:23:29 +0200 Hi Tal, On Mon, 2012-07-16 at 18:02 +0300, Tal Hadad wrote: int* argsc; char*** argsv; argsv = Max.get_args (out argsc); If argsv is supposed to represent

Re: [Vala] array_length_type in CCode attribute should be applied to everything.

2012-06-16 Thread Tal Hadad
Date: Fri, 15 Jun 2012 18:39:18 +0200 Subject: Re: [Vala] array_length_type in CCode attribute should be applied to everything. From: lethalma...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org On Fri, Jun 15, 2012 at 5:27 PM, Tal Hadad tal...@hotmail.com wrote: According to Manual

[Vala] array_length_type in CCode attribute should be applied to everything.

2012-06-15 Thread Tal Hadad
According to Manual/Attributes[1], the array_length_type in the CCode attribute applies only to fields and methods. It should be applies also for parameters, properties and delegates so why not? Tal [1] https://live.gnome.org/Vala/Manual/Attributes

[Vala] After transfering ownership of compact class, Vala still call free method

2012-05-22 Thread Tal Hadad
I'm trying to write a nodes system which is tree based. Not matter how it works, this is part of the code: NodesRoot root = new NodesRoot (); stdout.printf (Root created\n); unowned NodesUnit unit = root.prepend_unit (); if (unit == null) stderr.printf (Not working!); stdout.printf (Unit

Re: [Vala] Allow passing ref/out as a pointer.

2012-04-15 Thread Tal Hadad
...@hotmail.com CC: vala-list@gnome.org 2012/4/12 Tal Hadad tal...@hotmail.com Can you please allow to cast a pointer type into ref/out? I mean to allow this: method ((ref) pointer,...) Same for the out keyword. Because sometimes there are binding issue. For example, glGenBuffers in gl.vapi(external

Re: [Vala] Vala for physics simulations?

2012-04-15 Thread Tal Hadad
Can't you use Bullet C API? http://code.google.com/p/bullet/issues/detail?id=43 Date: Thu, 12 Apr 2012 22:51:11 +0200 From: dura...@gmail.com To: lethalma...@gmail.com CC: vala-list@gnome.org Subject: Re: [Vala] Vala for physics simulations? Luca, I'm not using any physics engine. I have

Re: [Vala] Allow passing ref/out as a pointer.

2012-04-15 Thread Tal Hadad
://blazt.sablun.org/tmp/gl.vapi Date: Sun, 15 Apr 2012 10:47:17 +0200 Subject: Re: [Vala] Allow passing ref/out as a pointer. From: lethalma...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org 2012/4/15 Tal Hadad tal...@hotmail.com Hello Luca Even thought there are replacement for that, don't you

Re: [Vala] Allow passing ref/out as a pointer.

2012-04-15 Thread Tal Hadad
is the problem? Tal Date: Sun, 15 Apr 2012 11:26:41 +0200 Subject: Re: [Vala] Allow passing ref/out as a pointer. From: lethalma...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org 2012/4/15 Tal Hadad tal...@hotmail.com There's two GL vapis in ExternalBinding page. I'm talking about the one

Re: [Vala] Allow passing ref/out as a pointer.

2012-04-15 Thread Tal Hadad
Apr 2012 20:38:23 +0200 From: j...@vdnberg.net To: tal...@hotmail.com Subject: Re: [Vala] Allow passing ref/out as a pointer. On 04/15/2012 12:57 PM, Tal Hadad wrote: You're right! The problem is that I forgot to gl_begin () also in initialization(i.e. before game

[Vala] Allow passing ref/out as a pointer.

2012-04-12 Thread Tal Hadad
Can you please allow to cast a pointer type into ref/out? I mean to allow this: method ((ref) pointer,...) Same for the out keyword. Because sometimes there are binding issue. For example, glGenBuffers in gl.vapi(external) cause errors. Tal

Re: [Vala] Too many arguments in generated code

2012-04-11 Thread Tal Hadad
Compact classes are 100% C structs(no GObject at all). The difference is that compact class are threaded as a ref types, while structs are threaded as a value types. If the struct is used most of the time by ref type, it logically makes sense to define it as compact class. Compact class is

Re: [Vala] Posix Bindings

2012-04-04 Thread Tal Hadad
It comes with Vala installation. It shell be the location $(prefix}/share/vala-0.xx/vapi/posix.vapi. For example, in my Debian machine, it's is /usr/share/vala-0.16/vapi/posix.vapi If for some reason you still can't find them installed, you can dig in Vala tarballs. Yours, Tal Date: Wed, 4

[Vala] Calling to a non-static member of a null object

2012-04-02 Thread Tal Hadad
Just wanted to share with you some weird thing in Vala. I'll give an example to what I said in the title: This code return access to method denied: MainContext.iteration (null, false) See GLib docs[1]. You can pass null and it means the default main loop context. But how can we perform method for

Re: [Vala] Boxed type generics

2012-03-20 Thread Tal Hadad
Even known it's doesn't sound like that, and it's work in .Net, double? is always a pointer type. It's the same as double*. This explains the first example error. In the second one, you convert some type to double* and then to double(in the deceleration double tmp). The compiler seems to ignore

Re: [Vala] c#/mono to vala converter

2012-03-19 Thread Tal Hadad
In Google search, I get only 4 irrelevant results. Don't waste your time for searching that kind of thing. Vala logic is far different from .Net logic, so even if there were such thing, it was better to convert it manually. As far as I can see that, only class methods(head only), structures,

Re: [Vala] Purple.CoreUiOps

2012-02-24 Thread Tal Hadad
Shouldn't compact class install a default constructor when no constructor was provided by user? I don't think so, because it's only a VAPI wrapper. But if it so bugging you, you can decelerate new methods(and I think that also constructs) in the binding. Besides, what's the difference

Re: [Vala] Create an instance of a derived class, from a base class method

2012-02-19 Thread Tal Hadad
I don't understand what is your purpose: I don't understand why you don't use constructors, or static methods. See, the type deceleration must be explicit at complication time. However, if you don't want it, you can always use generics and the dynamic word. In simple words, as far as I know,

Re: [Vala] Create an instance of a derived class, from a base class method

2012-02-19 Thread Tal Hadad
...@hotmail.com CC: vala-list@gnome.org 2012/2/19 Tal Hadad tal...@hotmail.com: I don't understand what is your purpose: I don't understand why you don't use constructors, or static methods. I'd got myself in a bit of a mess inheriting singleton factory classes and static properties/methods

Re: [Vala] Sample app built with ninja+vala

2012-02-19 Thread Tal Hadad
You mention Tup, which I see this as a great tool. But have anyone found an autoconf alternative for Tup? Tal ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] vapigen ignores .metadata

2012-01-04 Thread Tal Hadad
I try to create a binding from GNOME official PanelApplet-4.0.gir to libpanelapplet-4.0.vapi. Vapi generation success, but the header file name is wrong(always PanelApplet-4.0.h). I tried to change it by adding a new file named libpanelapplet-4.0.metadata in the same directory: PanelApplet

Re: [Vala] vapigen ignores .metadata

2012-01-04 Thread Tal Hadad
Subject: Re: [Vala] vapigen ignores .metadata From: lethalma...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org 2012/1/4 Tal Hadad tal...@hotmail.com I try to create a binding from GNOME official PanelApplet-4.0.gir to libpanelapplet-4.0.vapi. Vapi generation success, but the header file

Re: [Vala] Vapigen failure for PanelApplet-4.0.gir

2011-12-26 Thread Tal Hadad
، كتب Tal Hadad: I try to generate vapi for PanelApplet-4.0(since vala don't include version 4.0), but vapigen fails: $ vapigen --library libpanel-applet-4.0 PanelApplet-4.0.gir Generally, a good idea is to use the vapis wherever possible, adding --pkg gtk+-3.0 should get you closer

[Vala] Can adding new virtual method break ABI?

2011-12-11 Thread Tal Hadad
I've read how GObject define virtual methods, in the XClass struct, and I'm afraid defining new virtual method can break ABI. Am I right? Before: struct _XClass { GObjectClass parent_class; /* stuff */ void (*do_action) (X *self, /* parameters */); }; After: struct _XClass { GObjectClass

Re: [Vala] Can adding new virtual method break ABI?

2011-12-11 Thread Tal Hadad
is currently done by Vala? Is it alphabetic or by the order of the decelerations? Thanks Tal Date: Sun, 11 Dec 2011 10:48:21 +0100 Subject: Re: [Vala] Can adding new virtual method break ABI? From: lethalma...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org 2011/12/11 Tal Hadad tal

Re: [Vala] How to cast Gdk.EventKey to Gdk.Event ?

2011-11-26 Thread Tal Hadad
Gdk.Event* real_e = (Gdk.Event*)(e); It's tested. Gdk.Event* is an unowned Gdk.Event, only different is syntax: (Gdk.Event)instance = (Gdk.Event*)-instance Tal Date: Fri, 25 Nov 2011 23:48:59 -0500 From: shawn.p.hu...@gmail.com To: vala-list@gnome.org Subject: [Vala] How to cast Gdk.EventKey

[Vala] [Bug?] Access to non-static field are permitted inside static methods

2011-11-26 Thread Tal Hadad
I've noticed now after finding a bug in my program, that access to non-static field are permitted inside static methods! I didn't believed no one was noticed this until now... Here is a code shows the behavior: class A { int num = 0; static void foo () { if (num == 0) num++; } }

[Vala] How to cancel async GIO DBus method?

2011-11-24 Thread Tal Hadad
Async GIO method can be canceled by Cancelable. Is there any way to cancel async DBus method by GIO? This is the method I may need to cancel: [DBus (name = org.freedesktop.DBus)] internal interface MasterDBus : GLib.Object { public abstract async string[] list_names () throws IOError; }

Re: [Vala] How to generate inline C functions?

2011-11-07 Thread Tal Hadad
Is there any CCode attribute to make the generated C function inline? Or, is it possible to generate C macros instead of functions with vala? For example: class Test { inline public void func1() { }Vala tutorial sadly doesn't say a word about it, but it shell look like:public inline

[Vala] [suggestion] Make lambda generated func inline(performance)

2011-10-16 Thread Tal Hadad
I thought on this simple suggestion: Whenever lambda expression exist, Vala translate it to func: static (type) __lambda4_ ([args]) { ... } Lambda expression is used for callback, but Vala always produce another func which is the real callback, which call lambda func (maybe for allowing user

[Vala] The right way to compare file timestamp?

2011-10-16 Thread Tal Hadad
I want to compare the timestamp of a given file, to see whether a modification warning shell be given. I try to use this code as a start(with GIO package): if (file.query_exists ()) { FileInfo info = file.query_filesystem_info (*); TimeVal temp_time; info.get_modification_time (out

Re: [Vala] namespaces bug

2011-10-15 Thread Tal Hadad
Yes it's a disadvantage(if you look this way) of Vala, but don't think it's a bug. You see, Vala is based on GObject in pure C, and the cname of NameSpaceName is name_space_name... But I your post make me wonder, shell Vala convert name_space_name to cname name__space__name for compatibility, or

[Vala] Passing user_data in signals is supported, but could be better.

2011-10-10 Thread Tal Hadad
Vala does support passing a context argument, calling user_data to callbacks, by this two methods(source: FAQ and Tutorial): 1. Passing this/self as user_data, for instance method. 2. Variables outside the lambda expression. Method 2 is done perfectly by Vala, when we talk about lambda

Re: [Vala] Passing user_data in signals is supported, but could be better.

2011-10-10 Thread Tal Hadad
private static void static_on_stop_clicked ([args], user_data_type user_data) { A copypaste mistake in method name. Please threat this as: private static void method ([args], user_data_type user_data) { From: tal...@hotmail.com To: vala-list@gnome.org Date: Mon, 10 Oct 2011 15:48:45 +0200

Re: [Vala] Passing user_data in signals is supported, but could be better.

2011-10-10 Thread Tal Hadad
Rosenfeld 2011/10/10 Tal Hadad tal...@hotmail.com Vala does support passing a context argument, calling user_data to callbacks, by this two methods(source: FAQ and Tutorial): 1. Passing this/self as user_data, for instance method. 2. Variables outside the lambda expression. Method 2 is done

Re: [Vala] Passing user_data in signals is supported, but could be better.

2011-10-10 Thread Tal Hadad
into accepting an object as user_data, you end up having to do this management yourself and many times it´s actually impossible to do it right. Alexandre Rosenfeld 2011/10/10 Tal Hadad tal...@hotmail.com Thanks for your answer Alexandre Rosenfeld, but you get me wrong. Why not just use

Re: [Vala] How to make shared library in win32?

2011-09-01 Thread Tal Hadad
valac --pkg config --pkg gtk+-2.0 --pkg gee-1.0 --pkg libxml-2.0 --vapidir=../vapi/ *.vala --disable-warnings --library dvw-0.1 -X -fPIC -X -shared -o test_shared.dll All this in one line. You must pass this two arguments to CC(C Compiler), which each one comes after the -X. See the first link

[Vala] Is a Direct GCallback to signals possible in vala?

2011-08-31 Thread Tal Hadad
I take a look in the generated C code, and I thought, does signal handling have to be two stages? It possible to do it on 1 stage, right? I'll give an example that shows this behavior: Take a look on gtk_widget_hide_on_delete method in GTK. This method were ment to be used as direct callback to

Re: [Vala] Is a Direct GCallback to signals possible in vala?

2011-08-31 Thread Tal Hadad
Sorry about my mistake, I should wrote at the end: widget.hide_on_delete() Tal From: tal...@hotmail.com To: vala-list@gnome.org Date: Wed, 31 Aug 2011 17:23:30 +0300 Subject: [Vala] Is a Direct GCallback to signals possible in vala? I take a look in the generated C code, and I thought, does

[Vala] (no subject)

2011-08-30 Thread Tal Hadad
Yes I've noticed that, I might did this accidentally, but the page does not exist: http://live.gnome.org/Vala/PanelAppletSample Date: Tue, 30 Aug 2011 12:40:47 +0200 Subject: Re: [Vala] Was GNOME Panel applet example removed? From: lethalma...@gmail.com To: tal...@hotmail.com 2011/8/30 Tal

Re: [Vala] Was GNOME Panel applet example removed?

2011-08-30 Thread Tal Hadad
Yes I've noticed that, I might did this accidentally, but the page does not exist: http://live.gnome.org/Vala/PanelAppletSample Date: Tue, 30 Aug 2011 12:40:47 +0200 Subject: Re: [Vala] Was GNOME Panel applet example removed? From: lethalma...@gmail.com To: tal...@hotmail.com 2011/8/30 Tal

Re: [Vala] Was GNOME Panel applet example removed?

2011-08-30 Thread Tal Hadad
Regards, Tomaž 2011/8/30 Tal Hadad tal...@hotmail.com: Yes I've noticed that, I might did this accidentally, but the page does not exist: http://live.gnome.org/Vala/PanelAppletSample Date: Tue, 30 Aug 2011 12:40:47 +0200 Subject: Re: [Vala] Was GNOME Panel applet example removed

Re: [Vala] Was GNOME Panel applet example removed?

2011-08-30 Thread Tal Hadad
Then we end up having N versions of the Vala tutorial and all code examples, for Vala versions 0.14, 0.12, 0.10, 0.8, ..., not just for the most recent stable release, multiplied with all the different versions for each library. I'm worried now. Do you mean you'll remove GNOME panel library

Re: [Vala] Can you add my project into vala application list?

2011-08-29 Thread Tal Hadad
Thanks! Done. From: ali.vakilz...@gmail.com Date: Mon, 29 Aug 2011 23:47:13 +0430 Subject: Re: [Vala] Can you add my project into vala application list? To: tal...@hotmail.com CC: vala-list@gnome.org it is a wiki. you can do it your self 2011/8/29 Tal Hadad tal...@hotmail.com Can you add my

[Vala] Valac doesn't shows errors, but assertion `_name != NULL' failed failed

2011-08-18 Thread Tal Hadad
I'm trying to write some library, using GNU autotools, but valac complains: ** (valac:23077): CRITICAL **: vala_ccode_identifier_construct: assertion `_name != NULL' failed ** (valac:23077): CRITICAL **: vala_ccode_identifier_construct: assertion `_name != NULL' failed (yes it's twice) It

[Vala] Contex menu dosn't working for non-label in GNOME panel

2011-08-11 Thread Tal Hadad
First, I'm asking that here because all other places haven't response me, and Vala provides an example. I'm trying to create my own GNOME panel, but I got a strange error: When pressing right button on GNOME panel applet, it should pop the context menu. It does for labels. But, only for

Re: [Vala] libxml2 on windows (undefined reference to `xmlNewTextWriterFilename')

2011-08-09 Thread Tal Hadad
I'm sorry for redirecting you're thinking, but I recommend you to build this by mingw32(with msys). I'm telling you this because I've tested it... When you'll attemp to install, you'll probably run into some troubles(pthreads), so follow this guide:

Re: [Vala] Implicating two interface, when methods name are different(name conflict)

2011-08-09 Thread Tal Hadad
+0200 From: lethalma...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org Subject: Re: [Vala] Implicating two interface, when methods name are different(name conflict) On Sat, Aug 06, 2011 at 09:33:49PM +0300, Tal Hadad wrote: I has some C#/.Net past and it possible

[Vala] Implicating two interface, when methods name are different(name conflict)

2011-08-06 Thread Tal Hadad
I has some C#/.Net past and it possible to implicate two different interface, where both contains foo method. The idea behinds this solution, is that one of the implication must be explicit: public interface ISampleInterface1 { void Foo(); } public interface ISampleInterface2 { void

Re: [Vala] Implicating two interface, when methods name are different(name conflict)

2011-08-06 Thread Tal Hadad
conflict) On Sat, Aug 06, 2011 at 09:33:49PM +0300, Tal Hadad wrote: I has some C#/.Net past and it possible to implicate two different interface, where both contains foo method. The idea behinds this solution, is that one of the implication must be explicit: https://bugzilla.gnome.org

[Vala] (no subject)

2011-08-06 Thread Tal Hadad
conflict) On Sat, Aug 06, 2011 at 09:33:49PM +0300, Tal Hadad wrote: I has some C#/.Net past and it possible to implicate two different interface, where both contains foo method. The idea behinds this solution, is that one of the implication must be explicit: https://bugzilla.gnome.org

Re: [Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-05 Thread Tal Hadad
The first approach seems basic and very good, but I'm just wondering about asnc... You've got me wrong there, I don't want to block glib main loop and wait until it finishes rendering, I just wonder about this behavior: Suppose that user move forward when he press w in speed of 2(m)/(s) . Now

[Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-04 Thread Tal Hadad
In Vala docs(1), it is shown how to render a static display output using OpenGL. There two general ways which described: 1. Using GLFW/GLUT with a real game loop(re-render always). 2. Using Gtk/X11 for rendering a static visual output(using exposed event) I want my library to support rendering

Re: [Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-04 Thread Tal Hadad
I'm glad it's possible. Can you please explain how do you integrate this? I'm new(half year) for the glib concepts, so the only integration I know with Glib main loop is Idle.add ()... Does you do this single threaded, or dual? Many thanks, Tal Date: Thu, 4 Aug 2011 19:44:14 +0200 Subject:

Re: [Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-04 Thread Tal Hadad
Thank you. If I get you right, this will block events until I finish drawing, but that is the purpose. And is it possible to do it multi-threaded? In a way that input thread is different than drawing thread? Thanks again, Tal Date: Thu, 4 Aug 2011 20:10:23 +0200 Subject: Re: [Vala] How to

Re: [Vala] [Bug] valac doesn't add #include gio/gio.h when the file doesn't include main

2011-07-17 Thread Tal Hadad
#include gio/gio.h when the file doesn't include main On Sat, Jul 16, 2011 at 10:21:01PM +0300, Tal Hadad wrote: Continue from my last mail about my tries for writing DBus client(for MPRIS 2), I've got a new problem, which I fixed easily. I have a main.vala, which contain the main

Re: [Vala] complication error: Unbable to serialize a callback(by delegate) for Dbus(using GDBus)

2011-07-14 Thread Tal Hadad
: Wed, 13 Jul 2011 20:17:24 +0100 Subject: Re: [Vala] complication error: Unbable to serialize a callback(by delegate) for Dbus(using GDBus) From: a.kito...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org Hello, 2011/7/13 Tal Hadad tal...@hotmail.com: I'm trying to write

[Vala] FW: complication error: Unbable to serialize a callback(by delegate) for Dbus(using GDBus)

2011-07-14 Thread Tal Hadad
: Thu, 14 Jul 2011 14:12:14 +0100 From: a.kito...@gmail.com To: tal...@hotmail.com CC: vala-list@gnome.org Subject: Re: [Vala] complication error: Unbable to serialize a callback(by delegate) for Dbus(using GDBus) On 14 يول, 2011 م 01:08, Tal Hadad wrote: This doesn't make any sense

[Vala] complication error: Unbable to serialize a callback(by delegate) for Dbus(using GDBus)

2011-07-13 Thread Tal Hadad
I'm trying to write a client for MPRIS 2.0 specs, and one of my TODO list is to get all Media players which activated. This is done by passing all DBus addresses and check if it's in the format of org.mpris.MediaPlayer2.*. For doing this, I need to add callback to method list_names in interface

  1   2   >