Re: [Vala] Interfaces and asynchronous methods

2012-08-14 Thread rastersoft
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok, here are the interesting pieces of the code: interface backends : GLib.Object { [...] public abstract async BACKUP_RETVAL start_backup(out int64 last_backup_time); [...] } private backends backend; var rv=this.backend.start_backup(out

Re: [Vala] Interfaces and asynchronous methods

2012-08-14 Thread Tal Hadad
To: e...@yorba.org CC: vala-list@gnome.org Subject: Re: [Vala] Interfaces and asynchronous methods -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok, here are the interesting pieces of the code: interface backends : GLib.Object { [...] public abstract async BACKUP_RETVAL

Re: [Vala] Interfaces and asynchronous methods

2012-08-14 Thread Eric Gregory
On Tue, Aug 14, 2012 at 2:49 AM, rastersoft ras...@rastersoft.com wrote: BTW, Jim Nelson answered that I have to do something like this: run_async.begin(on_run_async_completed); /* ... */ void on_run_async(AsyncResult result, Object? source) { int result = run_async.end(result); }

[Vala] Interfaces and asynchronous methods

2012-08-13 Thread rastersoft
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all: I tried to define an interface with an async method, but I receive this error in the line where I try to invoke it in an object that implements it: backup.vala:246.14-246.43: error: invocation of void method not allowed as expression Are

Re: [Vala] Interfaces and asynchronous methods

2012-08-13 Thread Eric Gregory
On Mon, Aug 13, 2012 at 4:03 PM, rastersoft ras...@rastersoft.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all: I tried to define an interface with an async method, but I receive this error in the line where I try to invoke it in an object that implements it:

[Vala] interfaces

2012-07-06 Thread andreas graeper
following compiles without warning/error but at runtime it tells me (process:6285): GLib-GObject-WARNING **: cannot add interface type `JJJ' to type `BBB' which does not conform to prerequisite `III' /* [public|private] interface name { ** constant/method/delegate/signal ** } */ interface III

Re: [Vala] interfaces

2012-07-06 Thread Thomas Jollans
On 07/06/2012 08:56 AM, andreas graeper wrote: following compiles without warning/error but at runtime it tells me (process:6285): GLib-GObject-WARNING **: cannot add interface type `JJJ' to type `BBB' which does not conform to prerequisite `III' [snip] is there actually need to declare

Re: [Vala] interfaces sharing methods

2012-06-05 Thread Luca Bruno
On Sat, Jun 2, 2012 at 10:35 PM, Jarosław Ciupiński kotow...@gmail.comwrote: Hi, Recently I run into a problem of interfaces sharing methods. I have two interfaces that have method of the same name, same result, same parameter list - it is done on purpose this way, so interfaces would

Re: [Vala] interfaces sharing methods

2012-06-05 Thread Luca Bruno
On Tue, Jun 5, 2012 at 7:08 PM, Simon Busch morp...@gravedo.de wrote: I got at a point recently where I had the same problem. Is this going to be happen in Vala anytime soon (say 0.18)? It's planned for sure, but don't know when. -- www.debian.org - The Universal Operating System

[Vala] interfaces sharing methods

2012-06-02 Thread Jarosław Ciupiński
Hi, Recently I run into a problem of interfaces sharing methods. I have two interfaces that have method of the same name, same result, same parameter list - it is done on purpose this way, so interfaces would require such method to be implemented. It compiles fine. But it crushes when run. I

[Vala] interfaces and properties

2011-02-03 Thread Raul Gutierrez Segales
Hi, Why is it that one *doesn't* have to use override when implementing a property declared on an interface? I.e.: interface Animal { public abstract GenericArraystring names_of_bones { get; set; } } class Dog : Object, Animal { public GenericArraystring names_of_bones { get; set; } }

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

2010-12-06 Thread Abderrahim Kitouni
Hello, في ن، 06-12-2010 عند 01:25 +0100 ، كتب Aleksander Wabik: As classes not inheriting from Object have different ref and unref functions (Foo will have foo_ref, and foo_unref, Bar will have bar_ref and bar_unref), if an object is referenced by the reference of interface

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

2010-12-06 Thread Jürg Billeter
On Mon, 2010-12-06 at 01:25 +0100, Aleksander Wabik wrote: As classes not inheriting from Object have different ref and unref functions (Foo will have foo_ref, and foo_unref, Bar will have bar_ref and bar_unref), if an object is referenced by the reference of interface type, there's no

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

2010-12-06 Thread Aleksander Wabik
Hi, On Mon, 2010-12-06 at 01:25 +0100, Aleksander Wabik wrote: As classes not inheriting from Object have different ref and unref functions (Foo will have foo_ref, and foo_unref, Bar will have bar_ref and bar_unref), if an object is referenced by the reference of interface type, there's no

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

2010-12-05 Thread Aleksander Wabik
Hi, no, you did not understand: I'm not trying to create object from an interface. 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. I'm creating instances of that class, but the reference is

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] Interfaces - why do they must have prerequisites?

2010-12-05 Thread Aleksander Wabik
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] Interfaces - why do they must have prerequisites?

2010-12-05 Thread Aleksander Wabik
I am really sorry for flood, but it just came into my mind: (CCing Jürg , as I think I've found a bug in the object system design) 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

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

2010-12-04 Thread Aleksander Wabik
Hi all, I'm using valac 0.11.2, and when I compile the following code, it fails: // --- test.vala --- namespace Test { public interface IFoo { public abstract bool run(); } public class Foo : IFoo { public

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] Interfaces and Mixins

2010-06-15 Thread Robert Powell
On Sat, Jun 12, 2010 at 7:03 AM, tecywiz121 tecywiz...@hotmail.com wrote: Hey, Hey! The following code won't compile unless I create a flush() in Concrete, but I can't seem to access Entity.flush() at all, any way around this that doesn't involve making Entity a class? public interface

Re: [Vala] Interfaces and Mixins

2010-06-15 Thread tecywiz121
On Tue, 2010-06-15 at 14:50 -0700, Robert Powell wrote: On Sat, Jun 12, 2010 at 7:03 AM, tecywiz121 tecywiz...@hotmail.com wrote: Hey, Hey! The following code won't compile unless I create a flush() in Concrete, but I can't seem to access

Re: [Vala] Interfaces and Mixins

2010-06-15 Thread Robert Powell
On Tue, Jun 15, 2010 at 4:00 PM, tecywiz121 tecywiz...@hotmail.com wrote: On Tue, 2010-06-15 at 14:50 -0700, Robert Powell wrote: On Sat, Jun 12, 2010 at 7:03 AM, tecywiz121 tecywiz...@hotmail.com You can access Entity.flush by casting this to an Entity. I think you'll find that when you

[Vala] Interfaces and Mixins

2010-06-12 Thread tecywiz121
Hey, The following code won't compile unless I create a flush() in Concrete, but I can't seem to access Entity.flush() at all, any way around this that doesn't involve making Entity a class? public interface Flushable : Object { public abstract void flush(); } public interface Entity :

Re: [Vala] Bug: Implementing properties in vala Interfaces fails with Genie

2009-03-10 Thread Hans Baier
               ^ Compilation failed: 6 error(s), 0 warning(s) P.S.: used latest git commit 66d126e6bebca5cb6ea286979764b3ce15da24a7 ___ Vala-list mailing list Vala-list@gnome.org