[Vala] Ownership and strings

2009-05-29 Thread Jiří Zárevúcky
Hello. I'm new to Vala and I don't really understand the ownership concept and especially in relation to string handling. There are some texts I found about it, but it all seems out of date or unfinished. Is there some tutorial that can help me understand how to work with strings? (I'm currently

Re: [Vala] Problems with virtual extern methods.

2009-06-01 Thread Jiří Zárevúcky
I don't really think virtual and extern should be possible to combine. It doesn't make much sense IMHO. ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] GCC error with markup parser

2009-06-06 Thread Jiří Zárevúcky
Hi, I'm trying to use GLib's markup parser, but I'm getting the following error. Is that a bug or some mistake on my side? j...@jury-ubuntu:path$ valac Parser.vala -o Parser path/Parser.vala.c: In function ‘test_parser_constructor’: path/Parser.vala.c:168: error: ‘GMarkupParserStartElementFunc’

Re: [Vala] [Patch] GCC error with markup parser

2009-06-07 Thread Jiří Zárevúcky
Dne 7. červen 2009 19:43 Yu Feng rainwood...@gmail.com napsal(a): Hi Jiri, I think it is a bug in glib-2.0.vapi. Although it looks irrelevant, this patch solves your problem. Thank you. It works, but it actually doesn't fix it completely. When I include a variable of that delegate, it won't

Re: [Vala] Creating bindings for Oracle OCI

2009-06-15 Thread Jiří Zárevúcky
Hello. Delegates in VAPI are, in fact, bindings to function pointer (which delegates translate to). So in order to be able to do that, there have to be those pointers defined in the C header (otherwise it won't compile with GCC). If they aren't, you can still define them, but have to use a

Re: [Vala] byte array - string

2009-06-15 Thread Jiří Zárevúcky
: uchar[] string_to_array (string input, string output_charset = utf-8); string array_to_string (uchar[] input, string input_charset = utf-8); which would solve both problems in one go. Dne 15. červen 2009 17:22 Jiří Zárevúcky zarevucky.j...@gmail.com napsal(a): Hello. It seems to me

Re: [Vala] [Genie] Help me please !

2009-06-15 Thread Jiří Zárevúcky
Your problem is that colorsel property has type Widget. You have to cast it to ColorSelection. Just two general notes about your question: - keep your questions in one thread - don't name the thread help me please. use something informative, for god's sake... 2009/6/15 Nicolas

Re: [Vala] libidn bindings?

2009-06-16 Thread Jiří Zárevúcky
-Functions Thanks in advance for any pointers. Dne 13. červen 2009 20:55 Jiří Zárevúcky zarevucky.j...@gmail.com napsal(a): Hello. Is there anyone working on those? There is no mention on this list or bugzilla, so I suppose there isn't. I've already started frying my brain with it. :) // Copyright

Re: [Vala] Creating bindings for Oracle OCI

2009-06-17 Thread Jiří Zárevúcky
-06-17 at 13:24 +0200, Jiří Zárevúcky wrote: You have problem with pointers, again. ;) Once you add out, it's not a pointer anymore as far as Vala is concerned, so you have to omit the asterisk. You are essentially replacing it. 2009/6/17 Shawn Ferris shawn.fer...@gmail.com: Ooops.. Resending

Re: [Vala] [Genie] Need help with for statement

2009-06-20 Thread Jiří Zárevúcky
2009/6/20 Nicolas c.r@wanadoo.fr: Hi, Someone know how can i convert this from c# to vala or genie: for (int i=0; i linesPerPage line numLines; i++) Thanks in advance for your response, Nicolas. Hello. In Vala it's exactly the same. For possibilities in Genie, take a look here:

Re: [Vala] Removal of Mono

2009-06-26 Thread Jiří Zárevúcky
Ah, another one of the anti-mono guys. Sigh... Let me tell you, that from the sole principle of how Vala works, it will never be possible to convert C# code in a mechanistic fashion. You could maybe try creating some sort of automatic converter, which wouldn't work anyway, as it would result in a

Re: [Vala] Removal of Mono

2009-06-26 Thread Jiří Zárevúcky
2009 13:48 Sam Liddicott s...@liddicott.com napsal(a): * Jiří Zárevúcky wrote, On 26/06/09 12:28: Ah, another one of the anti-mono guys. Sigh... Ah, another one of those guys who sees anti-mono guys everywhere. Let me tell you, that from the sole principle of how Vala works, it will never

Re: [Vala] Removal of Mono

2009-06-26 Thread Jiří Zárevúcky
Dne 26. červen 2009 14:41 Sam Liddicott s...@liddicott.com napsal(a): I'm not advocating the vala be able to compile C# code -- You're suggesting it. Otherwise you would mention that possibility at all. I mentioned it in order to avoid that discussion (fail fail!). I wanted to avoid the

Re: [Vala] Removal of Mono

2009-06-26 Thread Jiří Zárevúcky
2009/6/26 Michael Torrie torr...@gmail.com: Levi Bard wrote: Actually, the person in question is a fervent c++ proponent who has stated that vala is a gimmick. Perhaps someone should port tomboy to Vala just to illustrate what the language is capable, compared to both Mono and C++. I think

Re: [Vala] Port Tomboy?

2009-06-27 Thread Jiří Zárevúcky
2009/6/27 Yu Feng rainwood...@gmail.com: On Sat, 2009-06-27 at 08:03 +0100, Sam Liddicott wrote:      4. Port Tomboy as a show-case project port 4 seems to be very fun; how large is the codebase of tomboy? BTW: What is the largest show-case project driven by VALA, excluding vala itself?

Re: [Vala] Port Tomboy?

2009-06-27 Thread Jiří Zárevúcky
Dne 27. červen 2009 14:32 Raphael Bosshard raphael.bossh...@gmail.com napsal(a): Hello there, just to make think clear; I don't 'hate' Mono or despise its usage in any way. I just think that it would make sense to have some Mono-only libraries available for the whole Gnome-stack. Cheers,

Re: [Vala] Port Tomboy?

2009-06-27 Thread Jiří Zárevúcky
2009/6/27 Andrea Bolognani e...@kiyuko.org: What is the current state of interaction between Vala and Mono? I mean, would it be possible to take a useful Mono library, rewrite it in Vala, and make the Mono programs pretty much transparently use the rewrite instead of the original library?

Re: [Vala] Port Tomboy?

2009-06-29 Thread Jiří Zárevúcky
Dne 29. červen 2009 16:09 Levi Bard taktaktaktaktaktaktaktaktak...@gmail.com napsal(a): Many applications that run on Mono already use managed wrappers on native gobject libraries, a prime example being gtk+. Debian users, `apt-cache rdepends libgtk2.0-cil` to see a few. The gobject api

Re: [Vala] Removal of Mono

2009-06-29 Thread Jiří Zárevúcky
2009/6/29 Levi Bard taktaktaktaktaktaktaktaktak...@gmail.com: The on topic results of the thread so far are: ...pretty worthless. Actually, there are some valuable opinions in this thread. Can we please stop the ridiculousness now? Please? There is nothing ridiculous about (most of) this

Re: [Vala] Signal connection confusion

2009-06-29 Thread Jiří Zárevúcky
Seems like a bug to me. 2009/6/29 Frederik scumm_fr...@gmx.net: Hi, why do callbacks A, C and D connect to the signal but B doesn't? What are the rules? Best Regards, Frederik ___ Vala-list mailing list Vala-list@gnome.org

Re: [Vala] Emitting type symbols, identifiers and type-less parameters. bugzilla 558106

2009-06-30 Thread Jiří Zárevúcky
2009/6/30 Sam Liddicott s...@liddicott.com: The question is: How shall vapi files specify: that an argument may be any type that an argument may be a non-type type, e.g. a type symbol or identifier Jürg has suggested CCode attributes; so we could try to wrap these examples like this: I

Re: [Vala] Port Tomboy?

2009-07-01 Thread Jiří Zárevúcky
2009/7/1 Sam Liddicott s...@liddicott.com: I think you are right, and that the Vala project must be kept unconnected from the politics this struggle; but when the women get the bandages and basins of water ready, it is not to join in the fight, but to be prepared for the inevitable outcome.

[Vala] Interface distinction in class definition?

2009-07-01 Thread Jiří Zárevúcky
Hello. In Vala, derived class and implemented interfaces are defined the same say, like in C#. As this way there is no syntactical difference, C# convention states that interface names always start with I. For example, interface Foo would have name IFoo in C#. However, there is no such convention

Re: [Vala] Port Tomboy?

2009-07-02 Thread Jiří Zárevúcky
2009/7/2 Michael Torrie torr...@gmail.com: Jiří Zárevúcky wrote: Regardless the potential advantages of two directly comparable project, imagine what would it cause in a larger scale. gnote is already seen as a good counterpart to an evil project in the eyes of almost religionistic mono

Re: [Vala] GLib.SList as a property

2009-07-04 Thread Jiří Zárevúcky
2009/7/5 Lucas Hermann Negri kknd...@gmail.com: Hello, I have a property of GLib.SList type, defined this way: public SListstring labels { get{return h_labels;} set{h_labels = value;} } But this leaks memory. What's the correct way of doing this? I'd generally avoid using GLib's List

Re: [Vala] inherited constructors

2009-07-10 Thread Jiří Zárevúcky
As in Java, except it's base, not super. :) 2009/7/10 pancake panc...@youterm.com: I was trying to write some classes in Vala using basic inheritance but looks like the compiler does not inherits the class constructors that takes at least 1 argument. If the constructor gets no parameters it is

Re: [Vala] ownership passing problem...

2009-07-13 Thread Jiří Zárevúcky
2009/7/13 Fredderic magen...@gmail.com: To the wonderful wizards of Vala...  I need some help...  I have an object that presents certain information in a dialog.  Other instances of that object also share the same dialog.  Nothing else in the program needs to know that the Dialog even exists,

Re: [Vala] Understanding compiler... where to start?

2009-07-13 Thread Jiří Zárevúcky
) Here you have an overview of all used classes in vala-compiler. I think you can start reading at valaparser.vala (vala-version/vala/valaparser.vala) Regards Uwe 2009/7/13 Jiří Zárevúcky zarevucky.j...@gmail.com Hello everyone. It's been some time since I started learning Vala. Now that I

Re: [Vala] Libgee's Roadmap proposal

2009-07-20 Thread Jiří Zárevúcky
2009/7/20 Didier Ptitjes ptit...@free.fr: - Are there some things missing ? Could you fit in making Map interface a Collection? It is technically a collection of key-value pairs, and I see no reason why the interface shouldn't reflect it. :) ___

Re: [Vala] Libgee's Roadmap proposal

2009-07-21 Thread Jiří Zárevúcky
Dne 21. červenec 2009 17:06 Jiří Zárevúcky zarevucky.j...@gmail.com napsal(a): 2009/7/21 Julien Fontanet julien.fonta...@isonoe.net: Didier Ptitjes ptit...@... writes: Jiří Zárevúcky wrote: 2009/7/20 Didier Ptitjes ptitjes at free.fr: - Are there some things missing ? Could you fit

Re: [Vala] Libgee's Roadmap proposal

2009-07-21 Thread Jiří Zárevúcky
2009/7/21 Didier Ptitjes ptit...@free.fr: Hi list, Didier Ptitjes wrote: Open questions: I'd like to add some more ideas:  - Support for disengageable collection change events Sounds interesting, but I'm not sure about a real value.  - Support for collection updatable views (aka

Re: [Vala] Libgee's Roadmap proposal

2009-07-21 Thread Jiří Zárevúcky
Dne 21. červenec 2009 19:02 Didier Ptitjes ptit...@free.fr napsal(a): In fact, as shown in C5 documentation, union, intersection, ... set-based operations are implementable with by one call of add_all, remove_all, or retain_all on a Set object. Please look at the C5 documentation for more

Re: [Vala] How can I use the function g_main_context_get_thread_default in my vala Project?

2009-07-22 Thread Jiří Zárevúcky
2009/7/22 Sascha Dewald sascha.dew...@googlemail.com: Hello Friends, i want to use g_main_context_get_thread_default in my vala-project. The Class MainContext is missing this function. What is the preferred way to do this? Hello Sascha, the best thing you can do (AFAIK) is to fix the

Re: [Vala] [Libgee][RFC] Making MapK, V a CollectionMap.EntryK, V - Was: Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/23 Didier Ptitjes ptit...@free.fr: So here is the proposal: - Renaming Map.remove(K key) in Map.unset(K key) I don't know about that.. it would be kinda unobvious. People coming from C# and Java will be confused. I'm not sure whether Vala supports it, but in C#, you could do something

Re: [Vala] Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/20 Didier Ptitjes ptit...@free.fr: - Are there some things missing ? I have another proposal. Currently, number of elements in a collection is reflected in the size property. In many cases, that's a nonsense. For example, in HashMap, number of set keys can hardly be considered a size

Re: [Vala] [Libgee][RFC] Making MapK, V a CollectionMap.EntryK, V - Was: Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/24 Didier Ptitjes ptit...@free.fr: Levi Bard wrote: - Renaming Map.remove(K key) in Map.unset(K key) - Renaming Map.contains(K key) in Map.has(K key) - Make MapK, V inherit from CollectionMap.EntryK, V I like unset. has is not different enough from contains for my liking - I can see

Re: [Vala] [Libgee][RFC] Making MapK, V a CollectionMap.EntryK, V - Was: Libgee's Roadmap proposal

2009-07-23 Thread Jiří Zárevúcky
2009/7/24 Ali Sabil ali.sa...@gmail.com: On Thu, Jul 23, 2009 at 10:32 AM, Didier Ptitjesptit...@free.fr wrote: Please comment and argue ;) Could you please explain the rationale behind this change ? What would be the benefit from  turning a Map into a collection of Pair ? Efficient

Re: [Vala] [Libgee][RFC] Making MapK, V a CollectionMap.EntryK, V - Was: Libgee's Roadmap proposal

2009-07-24 Thread Jiří Zárevúcky
2009/7/24 Fredderic magen...@gmail.com: On Fri, 24 Jul 2009 02:21:14 +0200, Jiří Zárevúcky zarevucky.j...@gmail.com wrote: 2009/7/24 Ali Sabil ali.sa...@gmail.com: On Thu, Jul 23, 2009 at 10:32 AM, Didier Ptitjesptit...@free.fr Please comment and argue ;) Could you please explain

Re: [Vala] wish for Type Inference working for weak local variables

2009-08-01 Thread Jiří Zárevúcky
On 08/01/2009 04:36 PM, Łukasz Pankowski wrote: Hello According to the Vala tutorial Finally Vala has a mechanism called Type Inference, whereby a local variable may be defined using var instead of giving a type, so long as it is unambiguous what type is meant. Type Interface works great for

Re: [Vala] wish for Type Inference working for weak local variables

2009-08-02 Thread Jiří Zárevúcky
On 08/01/2009 08:14 PM, Hans Vercammen wrote: Hi, On Sat, 2009-08-01 at 16:53 +0200, Jiří Zárevúcky wrote: On 08/01/2009 04:36 PM, Łukasz Pankowski wrote: Finally Vala has a mechanism called Type Inference, whereby a local variable may be defined using var instead of giving a type

Re: [Vala] wish for Type Inference working for weak local variables

2009-08-03 Thread Jiří Zárevúcky
On 08/03/2009 12:34 AM, Jürg Billeter wrote: On Sun, 2009-08-02 at 16:20 +0200, Jiří Zárevúcky wrote: Yet, I'm kinda wondering about one thing. It seems to me some people were, are and will be wanting inference for weak variables, regardless the real benefits may be negligible. Even

Re: [Vala] gstreamer and libxml patches

2009-08-10 Thread Jiří Zárevúcky
On 08/10/2009 10:39 AM, Éric ALBER wrote: Hello, I wrote two patchs, one for the gstreamer binding and one for the libxml binding. I have sent them by mail ([1] [2])... The most reliable way to post patches is to open a bug in bugzilla and then continually prod devs on IRC. :)

Re: [Vala] Why do regular reference types leak null?

2009-08-14 Thread Jiří Zárevúcky
On 08/14/2009 02:48 AM, Sam Danielson wrote: The following code compiles with no warnings with the 0.7.3 compiler and segfaults at runtime. I understand that nullable types can be null but why are regular reference types allowed to be null? I noticed that if the return type of make_foo is

Re: [Vala] Why do regular reference types leak null?

2009-08-14 Thread Jiří Zárevúcky
On 08/14/2009 10:57 PM, Sam Danielson wrote: Why shouldn't they be null? IMO, it would just add much more trouble. Checking nulls is responsibility of the programmer. That is consistent with every other language I know, including dynamic ones, C#, Java, etc. Perhaps I am misunderstanding

Re: [Vala] Why do regular reference types leak null?

2009-08-16 Thread Jiří Zárevúcky
On 08/16/2009 09:28 PM, Magentus wrote: Out of interest, has there been any discussion about actually making Vala a GCC front-end? GCC already has the mechanism to do most of this... I suppose it's useful being able to convert it to C, and then distribute that so it can be compiled on

Re: [Vala] removing an element from a list

2009-08-31 Thread Jiří Zárevúcky
On 08/31/2009 10:59 PM, jezra lickter wrote: On Mon, 31 Aug 2009 03:07:57 +0200 Jiří Zárevúckyzarevucky.j...@gmail.com wrote: On 08/31/2009 03:05 AM, Jiří Zárevúcky wrote: On 08/31/2009 02:10 AM, jezra lickter wrote: The word test is not removed from the list. Am I doing

Re: [Vala] removing an element from a list

2009-09-01 Thread Jiří Zárevúcky
On 09/01/2009 08:51 AM, Didier Ptitjes wrote: Jiří Zárevúcky wrote: If the dependency concerns you, you can simply copy the class you use into your application. :) Vala compiler itself includes a copy of the whole library. Jiří, please, remember that Valac includes that code

Re: [Vala] Showing animated gif files.

2009-09-04 Thread Jiří Zárevúcky
On 09/04/2009 02:33 PM, Arkadi Viner wrote: Hi. I want to show some animation to the user while my program is busy getting some information from the internet. I have an animated file which is - *.gif type and I want to use it. Is there any library to handle animated gif files that I can use?

Re: [Vala] GtkActionEntry Vapi Issue

2009-09-09 Thread Jiří Zárevúcky
On 09/09/2009 04:11 AM, Lucas Beeler wrote: Since Gtk.ActionEntry structures are a major feature in Gtk/GNOME user interfaces, I'm sure that others have encountered this problem before. Any suggested workarounds, pointers to vapi fixes in the pipeline, or assistance of any other kind would be

[Vala] Thoughts on asynchronous methods

2009-09-11 Thread Jiří Zárevúcky
I did some thinking on the subject of asynchronous (aka yielding) methods. I'd like to share and discuss some of my ideas here. -- 1. yields keyword is far from intuitive --

Re: [Vala] Hi, Is Vala what I am looking for?

2009-09-21 Thread Jiří Zárevúcky
On 09/21/2009 10:52 PM, Andrés G. Aragoneses wrote: [...] Of course, what I'm talking about is about adding one more user choice, not removal of Mono like the subject of the original thread is named (especially if you consider that I work for Novell on some Mono class libraries ;) ). At last,

Re: [Vala] Hi, Is Vala what I am looking for?

2009-09-23 Thread Jiří Zárevúcky
On 09/23/2009 05:24 PM, Andrés G. Aragoneses wrote: Jiří Zárevúcky wrote: On 09/21/2009 10:52 PM, Andrés G. Aragoneses wrote: [...] Of course, what I'm talking about is about adding one more user choice, not removal of Mono like the subject of the original thread is named (especially

Re: [Vala] Impossible to subclass from gio stream classes?

2009-10-01 Thread Jiří Zárevúcky
On Wed, Sep 30, 2009 at 7:46 PM, Jan Hudec b...@ucw.cz wrote: On Wed, Sep 30, 2009 at 18:58:54 +0200, Philipp Zabel wrote: I'd like to subclass GLib.BufferedInputStream. Vala doesn't like the following construct: class MyStream : GLib.BufferedInputStream {     MyStream (GLib.InputStream

Re: [Vala] Fonts problem.

2009-10-10 Thread Jiří Zárevúcky
On Sat, Oct 10, 2009 at 4:57 PM, Arkadi Viner arkash...@gmail.com wrote: Hello, I want to ask you for an advice. I have build my gui with glade and it looks pretty well on my laptop but on some systems it doesn't look well. Well, you have to make it so it looks good everywhere. The

Re: [Vala] GtkBuilder example ... bug?

2009-11-28 Thread Jiří Zárevúcky
Jakub Klawiter píše v Ne 29. 11. 2009 v 01:31 +0100: Hello! Ok understand how it's working, thank you! I don't understand why (compiler forces me to use different names i like), but it's not a problem now. I'll understand it later (hope :D). (I assume you are still talking about method

Re: [Vala] GtkBuilder example ... bug?

2009-11-28 Thread Jiří Zárevúcky
I just realized I didn't send this mail to the mailing list. Sorry about that. Jakub Klawiter píše v So 28. 11. 2009 v 23:00 +0100: Hello! On Sat, Nov 28, 2009 at 21:53, Jakub Klawiter jklawi...@gmail.com wrote: so probably there is, a bug in example code. Can I ask where? ;-) Maybe

Re: [Vala] Printing Unicode Characters

2009-11-30 Thread Jiří Zárevúcky
Emad Al-Bloushi píše v Po 30. 11. 2009 v 19:44 +0300: I have tried this one it works but I do now know if there is alternative solution unichar unicode_character = 'ع'; stderr.printf(Unicode Character : %s\n,new StringBuilder().append_unichar(unicode_character).str); What about

Re: [Vala] Gtk menus

2009-12-03 Thread Jiří Zárevúcky
Mark Dewey píše v Čt 03. 12. 2009 v 06:17 -0700: Jiří Zárevúcky wrote: Just read the GTK manual, please. This is a Vala (not GTK) mailing list. If you are wondering, you can use any tutorial for C, since binding into Vala is very straightforward and you shouldn't have problems

Re: [Vala] Gtk menus

2009-12-03 Thread Jiří Zárevúcky
Mark Dewey píše v Čt 03. 12. 2009 v 10:05 -0700: Jiří Zárevúcky wrote: It's OK to discuss bindings. For example when … you don't know how to use them. However, when you ask about how to do something in Gtk, it isn't really related to bindings. You just don't know how to use the library

Re: [Vala] How to connect a delegate to a signal?

2009-12-07 Thread Jiří Zárevúcky
G.S.Alex píše v Po 07. 12. 2009 v 20:47 +0800: I used to think the delegate could be used just like method it self . But when I try to connect a delegate to a signal , i got the error: t.vala:24.29-24.29: error: Argument 1: Cannot convert from

Re: [Vala] Libgee problem

2009-12-09 Thread Jiří Zárevúcky
Nicolas píše v St 09. 12. 2009 v 13:49 +0100: Hi Abderrahim, Yes i tried with a ?, it build but i got a segmentation fault ! I'll try to find another solution. Could you post the code that segfaults? That's probably a bug in Vala. signature.asc Description: Toto je digitálně podepsaná

Re: [Vala] Libgee problem

2009-12-09 Thread Jiří Zárevúcky
Nicolas píše v St 09. 12. 2009 v 18:24 +0100: [...] Could you post the code that segfaults? That's probably a bug in Vala. Thank you. That's not a Vala bug. There is a problem that you don't supply Map's constructor with custom hash and equality methods. In that case, Map will only compare

Re: [Vala] Libgee problem

2009-12-09 Thread Jiří Zárevúcky
Nicolas píše v St 09. 12. 2009 v 20:10 +0100: Jiří, Thank you, i'm learning programming, so sorry for the crap ! ;-) Nicolas. In case you are just learning programming (generally speaking), you should probably consider starting with some more mature language. There is still a lot of

Re: [Vala] Libgee problem

2009-12-09 Thread Jiří Zárevúcky
Xavier Bestel píše v St 09. 12. 2009 v 22:42 +0100: [...] Excuse me, but I'm a bit lost: I thought the question mark was for nullable types. What's the link with boxed types ? Thanks, Xav In order to make a value type nullable, you need to convert it to a reference type. That's

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

2010-01-01 Thread Jiří Zárevúcky
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 class FooRadioToolButton below I get the error The name `from_stock'

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

2010-01-02 Thread Jiří Zárevúcky
Jan Hudec píše v So 02. 01. 2010 v 11:29 +0100: On Fri, Jan 01, 2010 at 12:02:31 +0100, Jiří Zárevúcky wrote: [...] Unfortunately this isn't going to work, because Gtk.RadioToolButton.from_stock, like all Gtk allocators (*_new functions), lacks class-method form (*_construct function

Re: [Vala] Question about namespaces..

2010-01-08 Thread Jiří Zárevúcky
Shawn Ferris píše v St 06. 01. 2010 v 12:22 -0700: 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 the plugins is

Re: [Vala] Support for method overloading.

2010-01-08 Thread Jiří Zárevúcky
Fabzter píše v Čt 07. 01. 2010 v 16:01 -0600: Hi. I have been playing with Vala for some months. I find it to be a really cool language, thus, I'm thinking in porting an medium sized personal project from C# to Vala, but it relies heavyly on method and constructor overloading, and having this

Re: [Vala] Support for method overloading.

2010-01-12 Thread Jiří Zárevúcky
Sam Liddicott píše v Út 12. 01. 2010 v 07:25 +: Overloading could easily be supported with mandatory cname or csuffix attributes; that an explicit name needs to be given for C is no reason that it needs to be given for vala which could do regular overloading. I think it ought to be

Re: [Vala] Support for method overloading.

2010-01-12 Thread Jiří Zárevúcky
Sam Liddicott píše v Út 12. 01. 2010 v 16:04 +: * Jiří Zárevúcky wrote, On 12/01/10 14:43: Sam Liddicott píše v Út 12. 01. 2010 v 07:25 +: Overloading could easily be supported with mandatory cname or csuffix attributes; that an explicit name needs to be given for C

Re: [Vala] Threads and async (was: Threads and closures problem)

2010-01-13 Thread Jiří Zárevúcky
Michael 'Mickey' Lauer píše v Čt 14. 01. 2010 v 00:48 +0100: Jörn's mail about threads and closures reminded me about a problem I wanted to highlight here. The addition of async functions in Vala is a very great feature, however I wonder how this could work with multiple threads? As far as I

Re: [Vala] Immutable variables

2010-01-15 Thread Jiří Zárevúcky
pancake píše v Pá 15. 01. 2010 v 08:42 +0100: Is there a way to define them? I need it to solve some warnings for the vapis describing some C functions accepting const char* as argument. As I see in the compiler source is that it is not supported. Only for struct or class definitions

Re: [Vala] New Member / Democamp at CUSEC

2010-01-19 Thread Jiří Zárevúcky
Sam Wilson píše v Út 19. 01. 2010 v 10:46 -0500: Hello! My name is Sam Wilson, though I usually go by tecywiz121 online. First I'd just like to say hi to everyone who works or is interested in vala, and thanks for making a very cool new programming language! Some random background about

Re: [Vala] Unboxing Value Types

2010-01-19 Thread Jiří Zárevúcky
Sam Wilson píše v Út 19. 01. 2010 v 11:02 -0500: Hello again! random question, how are you supposed to unbox a value type (say float) ? Here is how I am trying to do it, but it won't compile: [code] public void main(string[] args) { float? a = 6; printfloat((float)a); }

Re: [Vala] Another Question

2010-01-19 Thread Jiří Zárevúcky
Sam Wilson píše v Út 19. 01. 2010 v 18:49 -0500: Hello once again friendly mailing list! I have another question, probably my own fault this time: why does the following not produce what I expect it to? [code]public int main(){ string[] test_array, test2; TestClass tc; ulong len1,

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

2010-01-20 Thread Jiří Zárevúcky
tecywiz121 píše v St 20. 01. 2010 v 16:49 -0500: I am just wondering if it is possible to have an array of nullable strings, and if so, what is the proper syntax? Sam I believe array of class type can always contain nulls. Or am I mistaken? signature.asc Description: Toto je digitálně

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

2010-01-20 Thread Jiří Zárevúcky
Frederik píše v St 20. 01. 2010 v 23:34 +0100: Sam Wilson wrote: Subject: Re: [Vala] Proper Syntax for Array of Nullable Strings From: zarevucky.j...@gmail.com To: tecywiz...@hotmail.com CC: vala-list@gnome.org Date: Wed, 20 Jan 2010 23:08:19 +0100 tecywiz121 píše v St 20. 01. 2010

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

2010-01-20 Thread Jiří Zárevúcky
Sam Wilson píše v St 20. 01. 2010 v 17:42 -0500: Date: Wed, 20 Jan 2010 23:23:11 +0100 From: scumm_fr...@gmx.net To: vala-list@gnome.org Subject: Re: [Vala] Proper Syntax for Array of Nullable Strings Jiří Zárevúcky wrote: tecywiz121 píše v St 20. 01. 2010 v 16:49 -0500: I

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

2010-01-20 Thread Jiří Zárevúcky
Frederik píše v St 20. 01. 2010 v 23:58 +0100: Jiří Zárevúcky wrote: What is the point of having Vala check it everywhere? I expect programmer to know what is going on inside a method/class he wrote. Input and output values are being checked and that's IMO perfectly enough. Imagine

Re: [Vala] 'weak' keyword context?

2010-01-20 Thread Jiří Zárevúcky
Andrés G. Aragoneses píše v Čt 21. 01. 2010 v 02:57 +0100: Hi there, My question is simple: can the weak keyword be used for local variables instead of fields? (Sorry I cannot check it right now with the last version.) If yes (or if it will in some future version), does it really have any

Re: [Vala] 'weak' keyword context?

2010-01-20 Thread Jiří Zárevúcky
Andrés G. Aragoneses píše v Čt 21. 01. 2010 v 03:17 +0100: El 21/01/10 03:05, Jiří Zárevúcky escribió: Andrés G. Aragoneses píše v Čt 21. 01. 2010 v 02:57 +0100: Hi there, My question is simple: can the weak keyword be used for local variables instead of fields? (Sorry I cannot check

Re: [Vala] Gtk.Dialog.show crashes app

2010-01-23 Thread Jiří Zárevúcky
Nor Jaidi Tuah píše v So 23. 01. 2010 v 10:39 +0800: I don't know if this is a vala bug or I have missed something. In the following code I'm creating a Gtk.Dialog and keeping it handy to be shown non-modal using show(). The trouble is, after the dialog is closed, reopening it will crash the

Re: [Vala] Gtk.Dialog.show crashes app

2010-01-25 Thread Jiří Zárevúcky
Nor Jaidi Tuah píše v Po 25. 01. 2010 v 07:58 +0800: dialog.delete_event.connect (() = {dialog.hide_on_delete ();}); Perhaps you wanted return dialog.hide_on_delete (); there? I didn't do this in a long time, bug if I recall correctly, you need to stop delete_event by returning

Re: [Vala] Commit that breaks MarkupParseContext

2010-01-26 Thread Jiří Zárevúcky
Michael 'Mickey' Lauer píše v Út 26. 01. 2010 v 23:24 +0100: Am Dienstag, den 26.01.2010, 15:48 -0600 schrieb Sandino Flores Moreno: The next URL has the testcase: https://bugzilla.gnome.org/attachment.cgi?id=152347 It demonstrates that using methods as callbacks with MarkupParser is

Re: [Vala] Commit that breaks MarkupParseContext

2010-01-26 Thread Jiří Zárevúcky
Evan Nemerson píše v Út 26. 01. 2010 v 14:53 -0800: Sorry, wrong patch. Of course I'll want to actually revert the other one ;) On Tue, 2010-01-26 at 14:48 -0800, Evan Nemerson wrote: I just talked to Jürg in IRC, and he prefers the old version too, so it's going to get reverted.

Re: [Vala] Questions on async functions

2010-02-03 Thread Jiří Zárevúcky
Nor Jaidi Tuah píše v St 03. 02. 2010 v 09:36 +0800: Q1. What is the recommended way of aborting an async function so that another invocation can be made only after the previous one has stopped, thus ensuring that there is at most one invocation at any time? I think I don't fully

Re: [Vala] Questions on async functions

2010-02-03 Thread Jiří Zárevúcky
Sam Wilson píše v St 03. 02. 2010 v 10:01 -0500: Q2. Any hope of getting the following replaced with a better syntax? :-) Idle.add(async_function.callback); yield; Why not simply: yield; ? Because 'yield' just stops the method until the

Re: [Vala] Vala Journal, Issue #1

2010-02-03 Thread Jiří Zárevúcky
Nor Jaidi Tuah píše v Po 01. 02. 2010 v 14:44 +0800: Coalesce operator (??) is now implemented in master. ;) https://bugzilla.gnome.org/show_bug.cgi?id=580816 May I suggest adding ??=, as in x ??= y; That would be quite logical I think. I've opened an enhancement request on the

Re: [Vala] Vala Journal, Issue #1

2010-02-03 Thread Jiří Zárevúcky
Xavier Bestel píše v Po 01. 02. 2010 v 12:24 +0100: On Mon, 2010-02-01 at 14:44 +0800, Nor Jaidi Tuah wrote: Coalesce operator (??) is now implemented in master. ;) https://bugzilla.gnome.org/show_bug.cgi?id=580816 May I suggest adding ??=, as in x ??= y; Too bad C# choose ?? as

Re: [Vala] Vala Journal, Issue #1

2010-02-03 Thread Jiří Zárevúcky
Alessandro Pellizzari píše v St 03. 02. 2010 v 18:23 +0100: Il giorno mer, 03/02/2010 alle 17.52 +0100, Jiří Zárevúcky ha scritto: Based on a few requests, I've created a blog for this. Hope you'll like it :) http://valajournal.blogspot.com/ Thank you. I subscribed to the feed

Re: [Vala] for loop and closure (bug or big gotcha?)

2010-02-05 Thread Jiří Zárevúcky
Jiří Zárevúcky píše v Pá 05. 02. 2010 v 16:08 +0100: Fredderic Unpenstein píše v Pá 05. 02. 2010 v 23:57 +1100: 2010/1/23 Sam Liddicott s...@liddicott.com: I used a language called charamel for controlling 3d figurs. It's closures supported variables in 2 ways. Like valàa

[Vala] Vala Journal, the second issue

2010-02-07 Thread Jiří Zárevúcky
This time straight to the web. Comments welcome. http://valajournal.blogspot.com/2010/02/issue-2-week-after.html signature.asc Description: Toto je digitálně podepsaná část zprávy ___ Vala-list mailing list Vala-list@gnome.org

Re: [Vala] maemo5 hildon input mode

2010-02-08 Thread Jiří Zárevúcky
Martin DeMello píše v Po 08. 02. 2010 v 22:26 +0530: I'm trying to disable Maemo's autocapitalisation in a Gtk.Entry field. Maemo 5 adds a hildon-input-mode property to Gtk.Entry [ http://maemo.org/api_refs/5.0/5.0-final/gtk/GtkEntry.html], but I can't find any way to access it from Vala,

Re: [Vala] Problems using ComboBox with model

2010-02-08 Thread Jiří Zárevúcky
Lars-Erik Helander píše v Út 09. 02. 2010 v 01:41 +0100: Do anyone have a working example of using a ComboBox with model (not the simple text API)? Kind Regards Lars I don't do much Gtk, so I can't help you with this specifically, but I recommend looking for examples in C if you have at

Re: [Vala] Is it possible to do a reading buffer offset in vala?

2010-02-09 Thread Jiří Zárevúcky
JM píše v Út 09. 02. 2010 v 10:36 +0100: Hi all I have a little problem on working with buffer offsets in vala. In C doing an offset for a char buf[SOME_SIZE]; is easy, but I have difficulties doing it in vala. You can simply use the same way you would in C. Cast your buffer to a pointer

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread Jiří Zárevúcky
pHilipp Zabel píše v Út 09. 02. 2010 v 16:37 +0100: On Tue, Feb 9, 2010 at 3:53 PM, Levi Bard taktaktaktaktaktaktaktaktak...@gmail.com wrote: While this is indeed correct workaround, the Hildon binding should probably be updated (so you get type-checking from the compiler). In that case,

Re: [Vala] Is it possible to do a reading buffer offset in vala?

2010-02-09 Thread Jiří Zárevúcky
JM píše v Út 09. 02. 2010 v 18:52 +0100: Hello Jiří Thanks! It works fine with pointers. just like in C. I just there was a possibility to avoid them in vala because I have to manage them manually. But it's also fine this way. The only manual thing you are doing is moving the pointer. I

Re: [Vala] Is it possible to do a reading buffer offset in vala?

2010-02-09 Thread Jiří Zárevúcky
JM píše v Út 09. 02. 2010 v 19:43 +0100: Thanks for reply! Hmm... I thought all vala strings are handled as utf-8. So I casted the buffer just like this: print(%s\n,(string)buffer); What would you do ? Regards Jörn From what you're saying it looks like a problem in your terminal

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread Jiří Zárevúcky
pHilipp Zabel píše v Út 09. 02. 2010 v 22:05 +0100: 2010/2/9 Jiří Zárevúcky zarevucky.j...@gmail.com: pHilipp Zabel píše v Út 09. 02. 2010 v 16:37 +0100: On Tue, Feb 9, 2010 at 3:53 PM, Levi Bard taktaktaktaktaktaktaktaktak...@gmail.com wrote: While this is indeed correct workaround

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

2010-02-10 Thread Jiří Zárevúcky
Jan-Jaap van der Geer píše v St 10. 02. 2010 v 02:34 -0800: Jan Hudec b...@ucw.cz wrote: This looks like another use-case for extension methods in a day. I'd like to see them as well. It might be useful, in some cases. It should be noted that extension methods can only access class'

  1   2   >