Re: [Vala] help with java to vala

2012-10-26 Thread bsquared
On 10/25/2012 09:24 PM, Calvin Walton wrote: On Thu, 2012-10-25 at 13:00 -0700, bsquared wrote: I attempted a simple test using this: 8 private static const Setstring STATIC_SET; static construct { STATIC_SET = new

Re: [Vala] help with java to vala

2012-10-25 Thread bsquared
On 10/25/2012 09:39 AM, mar...@saepia.net wrote: Have you tried static construct { ... } ? (see https://live.gnome.org/Vala/Tutorial) m. 2012/10/23 bsquared bwcod...@gmail.com: Hello, Is it possible to initialize a static const HashSet? Similar to this from Java

Re: [Vala] How to: Cross Compile Vala to Win32/64

2012-10-23 Thread bsquared
parameter to the compilation command. First test everything in the terminal, though. Tarnyko bsquared writes: On 10/20/2012 09:35 PM, tarn...@tarnyko.net wrote: Hello bsquared, There's https://live.gnome.org/Vala/Win32CrossBuildSample, but it's not adapted to Vala ; it's more a general GCC

[Vala] help with java to vala

2012-10-23 Thread bsquared
Hello, Is it possible to initialize a static const HashSet? Similar to this from Java? 8 private static final SetString STATIC_SET; static { STATIC_SET = new HashSetString(); STATIC_SET.add(Data One);

Re: [Vala] How to: Cross Compile Vala to Win32/64

2012-10-21 Thread bsquared
On 10/20/2012 09:35 PM, tarn...@tarnyko.net wrote: Hello bsquared, There's https://live.gnome.org/Vala/Win32CrossBuildSample, but it's not adapted to Vala ; it's more a general GCC cross-build tutorial. I may have time to write a tutorial in this style (http://www.tarnyko.net/en/?q=node/9

Re: [Vala] How to: Cross Compile Vala to Win32/64

2012-10-21 Thread bsquared
On 10/21/2012 04:18 PM, Thomas Jollans wrote: On 10/20/2012 09:33 PM, bsquared wrote: Hello, It's been a while since I have looked at Vala. I am preparing to write a simple app that I would like to make available for Linux and Windows. I am having trouble finding documentation to cross

[Vala] How to: Cross Compile Vala to Win32/64

2012-10-20 Thread bsquared
Hello, It's been a while since I have looked at Vala. I am preparing to write a simple app that I would like to make available for Linux and Windows. I am having trouble finding documentation to cross-compile an app written in Vala to Windows binary. I want to code the project in Anjuta and

Re: [Vala] Help: unowned string returns garbage characters

2011-10-29 Thread bsquared
LoveBug356 thijsverm...@gmail.com writes: Hi, On Sat, 2011-10-29 at 09:44 -0700, bsquared wrote: Hello, I am refactoring some of my test code into a class and have run into a problem with unowned strings. I have a class that has several methods that return strings. These methods get

Re: [Vala] interfaced enum?

2011-10-29 Thread bsquared
LoveBug356 thijsverm...@gmail.com writes: Hi, On Sat, 2011-10-29 at 11:23 -0700, bsquared wrote: Hello, Can an enum implement an interface? Nope, this is not possible. Gr, Thijs If so, what is syntax? Thank you. I thought that was the case. -- Regards, Brian Winfrey

Re: [Vala] Compiling VTG under Ubuntu 11.10

2011-10-16 Thread bsquared
rastersoft ras...@rastersoft.com writes: Hi: I found your patches, and I applied it, but it still complains. Now the problem is with libafrodite: error: Package `afrodite-0.14' not found in specified Vala API directories or GObject-Introspection GIR directories Compilation failed: 1

[Vala] Help with Soup: get_chunk () vs. flatten ().data

2011-10-16 Thread bsquared
Hello, I'm following some c code as an example that uses MesageBody.get_chunk in a while loop. I am curious if/why this would be better than using Soup.MessageBody.flatten. the c code: while ((buffer = soup_message_body_get_chunk (http_message-response_body, offset))) {

Re: [Vala] Compiling VTG under Ubuntu 11.10

2011-10-16 Thread bsquared
rastersoft ras...@rastersoft.com writes: Hi: That link points to a sample plugin, not to Vala Toys... :? El 16/10/11 17:47, bsquared escribió: As I indicated. The sample can be used as a guide to installing a gedit plugin. I believe I pieced together how to install the plugin from

[Vala] trouble with make: note: previous definition ...

2011-10-15 Thread bsquared
Hello, I saw this in the past when I moved classes and namespaces using make to build. I solved this by avoiding make and running valac directly. I am seeing it this again, but the circumstances are different. I would like to know the cause and what steps to take to avoid it. I use

Re: [Vala] Compiling VTG under Ubuntu 11.10

2011-10-15 Thread bsquared
rastersoft ras...@rastersoft.com writes: Hi all: I updated my system to Ubuntu 11.10, and now I can't use VTG. There's no package for it, and I can't compile the source code from git. If I install only libvala-0.14, the configure script returns an error, saying that libvala is older than

Re: [Vala] how to pass a List by reference?

2011-10-14 Thread bsquared
Abderrahim Kitouni a.kito...@gmail.com writes: Hello, 2011/10/13 bsquared bwcod...@gmail.com: I am guessing that I'm going about this wrong, but I want to populate a list from a static method.     static void populate_list (ref SListstring list) {            list.append();     } I am

Re: [Vala] how to pass a List by reference?

2011-10-14 Thread bsquared
Martin Ertsås mert...@cisco.com writes: You could use out instead to populate the list: static void populate_list (out Sliststring list) { } And call this method with: var list = new Sliststring (); populate_list (out list); Thank you. I originally tried the 'out' modifier, and I got a

Re: [Vala] Questions about vapi generation and testing

2011-10-09 Thread bsquared
Thank you. I think that answers my question. -- Regards, Brian Winfrey ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] VAPI Generation Problems

2011-10-09 Thread bsquared
It looks like you need to add packages to the command line. I found the wiki page http://live.gnome.org/Vala/Bindings helpful. -- Regards, Brian Winfrey ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Questions about vapi generation and testing

2011-10-06 Thread bsquared
On Wed, Oct 5, 2011 at 8:45 PM, Daniel Espinosa eso...@gmail.com wrote: The better is to add annotations to gtk-doc, documentation if exists, in order to define data type stored in lists using (element-type TYPE) annotation. See at http://live.gnome.org/GObjectIntrospection/Annotations

[Vala] Questions about vapi generation and testing

2011-10-05 Thread bsquared
I have generated and tested a vapi for couchdb-glib 0.7.4, and have a couple of questions. 1. Is it necessary/recommended to specialize a generic? The generated vapi has lists without specialization, and these work fine in the tests. public GLib.SList list_databases ();

Re: [Vala] Questions about vapi generation and testing

2011-10-05 Thread bsquared
Luca Bruno lethalma...@gmail.com writes: On Wed, Oct 5, 2011 at 6:30 PM, bsquared bwcod...@gmail.com wrote: 1. Is it necessary/recommended to specialize a generic? The generated vapi has lists without specialization, and these work fine in the tests. public GLib.SList

[Vala] strcmp : incompatible pointer type warning

2011-10-03 Thread bsquared
warning: assignment from incompatible pointer type [enabled by default] vala: assert (strcmp (array.get_string_element (array.get_length () - 1), hola) == 0); c: GCompareFunc _tmp4_; [...] _tmp4_ = g_strcmp0; _tmp5_ =

Re: [Vala] vala-gen-introspection/vapigen probem

2011-10-02 Thread bsquared
Abderrahim Kitouni a.kito...@gmail.com writes: في س، 01-10-2011 عند 14:33 -0700 ، كتب bsquared: Test compile: valac --vapidir ../vapi --pkg Couchdb-glib-1.0 libcouchtests.vala I think the problem is that you need the .vapi to have the same name as the .pc (i.e. couchdb-glib rather than

Re: [Vala] What to do about: double free or corruption (fasttop)

2011-10-02 Thread bsquared
I have not seen this issue after generating new a vapi file. -- Regards, Brian Winfrey ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] vala-gen-introspection/vapigen probem

2011-10-01 Thread bsquared
Hello, Can anyone help me with this problem? I followed the instructions on http://live.gnome.org/Vala/Bindings, but the generated vapi file has incorrect header file name. I corrected the header file name, but in either case I get a compiler error that the header file cannot be found. I am

Re: [Vala] Iterating over enums

2011-09-30 Thread bsquared
tomw t...@ubilix.com writes: Hi, I'm trying to get enum values based upon a match to their string representation. To do that, I would need to iterate over the enums. I was wondering whether there is a simple way of doing it without creating an array first? Thanks,

[Vala] What to do about: double free or corruption (fasttop)

2011-09-30 Thread bsquared
Hello, I am using couchdb-glib-1.0.vapi. I am porting test-couchdb-glib.c to vala to gain insight into the library. I am intermittantly getting the error in the subject, and I am unsure how to proceed. for instance this code (loop1) completed without error: while

Re: [Vala] What to do about: double free or corruption (fasttop)

2011-09-30 Thread bsquared
After posting orignal, I removed some commented code, recompiled and ran with this result: Connecting to Couchdb at http://test:test@127.0.0.1:5985 /testcouchdbglib/TestArrayField: begin: test_array_field begin: create_fake_array end: create_fake_array fake array assigned fake array

[Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.

2011-09-19 Thread bsquared
Hello, I ran into a strange problem with a simple string property notify signal. public string sz_uri { get; set construct; } I connected the signal in construct like so. construct { this.notify[sz_uri].connect(uri_on_change); } private void uri_on_change(ParamSpec p) {

Re: [Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.

2011-09-19 Thread bsquared
After some sleep, I verified by running a test using peoperties with and without underscores. The properties with underscores were changed in the notify signal handler parameter. I tried Vala 0.13.4 and 0.13.1, and the result was the same. Here is a test: / public

Re: [Vala] Vala Compiler Error? property notify signal handler gets wrong parameter value.

2011-09-19 Thread bsquared
On Mon, Sep 19, 2011 at 10:40 AM, Luca Bruno lethalma...@gmail.com wrote: GObject properties use hypens, that's why. Thanks. Strange. Where can I find documentation about these kinds of GObject idiosyncrasies. I don't seem to find this information on 'http://developer.gnome.org/gobject/'. --

[Vala] libsoup-2.4.vapi missing SOUP_URI_VALID_FOR_HTTP()

2011-09-18 Thread bsquared
Hello, Is 'SOUP_URI_VALID_FOR_HTTP()' missing from libsoup.vapi? I grepped in the 0.14/vapi directory and it came back empty. I did find it in the gir directory though. Is this a bug, or is the gir used? $ valac --version Vala 0.14.0 -- Regards, Brian Winfrey

[Vala] Is there a built in method to expand path?

2011-09-18 Thread bsquared
I have been searching, but can't find a built in method to expand a relative path ('.', '../' etc.) or user's home ('~') like bash does. Does such a method exist? -- Regards, Brian Winfrey ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] Is there a built in method to expand path?

2011-09-18 Thread bsquared
bsquared bwcod...@gmail.com writes: I have been searching, but can't find a built in method to expand a relative path ('.', '../' etc.) or user's home ('~') like bash does. Does such a method exist? I finally stumbled upon it. GLib.File.parse_file(relative_path); -- Regards, Brian

Re: [Vala] valac compiles ok, but make ends with errors

2011-09-10 Thread bsquared
On Fri, Sep 9, 2011 at 8:08 PM, bsquared bwcod...@gmail.com wrote: Hello, I have read that this may be a problem with build system, but how can i fix it. when I run 'make clean make' I get previous definition of ... for each class in the file. but if I run valac it compiles fine

[Vala] valac compiles ok, but make ends with errors

2011-09-09 Thread bsquared
Hello, I have read that this may be a problem with build system, but how can i fix it. when I run 'make clean make' I get previous definition of ... for each class in the file. but if I run valac it compiles fine. Is the make system caching information somewhere? I rebooted and retried with

[Vala] Can constructors throw errors, cascade?

2011-09-07 Thread bsquared
Being new to both Vala and GObjects I hope you will forgive me if my questions are obvious. Is it acceptable for a constructor to throw an error. ie. public ResourceFile.from_file (string rc_filename) throws GLib.FileError { string sz_data;

Re: [Vala] live.gnome.org is down

2011-09-06 Thread bsquared
On Tue, Sep 6, 2011 at 12:22 AM, rastersoft ras...@rastersoft.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all The server live.gnome.org is down, and so all the pages about Vala. Does someone know when will it be active again? Thanks. - -- Nos leemos                

Re: [Vala] Help with json de/serialization

2011-09-05 Thread bsquared
On Mon, Sep 5, 2011 at 1:51 PM, Abderrahim Kitouni a.kito...@gmail.com wrote: في ح، 04-09-2011 عند 20:22 -0700 ، كتب bsquared: the above should be Json.gobject_deserialize (typeof(CouchApp.Env), n) HTH, Abderrahim Thanks. ___ vala-list mailing

Re: [Vala] General-purpose Makefile for building Vala projects (was: Does anyone know how to use parvala?)

2011-09-04 Thread bsquared
On Fri, Aug 26, 2011 at 5:09 PM, Damien Radtke damienrad...@gmail.com wrote: Okay, here's my final result. Possible improvements would include dependency checking, internationalization, etc., but for those it would still be better to use autotools. Assuming all dependencies are installed, you

Re: [Vala] General-purpose Makefile for building Vala projects (was: Does anyone know how to use parvala?)

2011-09-04 Thread bsquared
On Sun, Sep 4, 2011 at 10:01 AM, bsquared bwcod...@gmail.com wrote: On Fri, Aug 26, 2011 at 5:09 PM, Damien Radtke damienrad...@gmail.com wrote: Okay, here's my final result. Possible improvements would include dependency checking, internationalization, etc., but for those it would still

[Vala] Help with json de/serialization

2011-09-04 Thread bsquared
Hello, I am trying to move some JSON to GLib.Object descendant but cannot seem to figure it out. The JSON is the .couchapprc file which looks like this: {  env : {    default : {      db : http://localhost:5984/mydb;    },    prod : {      db : http://admin:passw...@myhost.com/mydb;    }  } }

[Vala] Error attempting to use WebKit-3.0.gir

2011-08-31 Thread bsquared
How can I use this gir directly. I get the following errors: $ valac --pkg gtk+-3.0 --pkg json-glib-1.0 --pkg JSCore-3.0 --pkg WebKit-3.0 --vapidir . --pkg config gss_js_vala.vala JSCore-3.0.gir:0.0-0.0: error: The type name `JSGlobalContextRef' could not be found JSCore-3.0.gir:0.0-0.0: error:

Re: [Vala] Vala completion support for vim

2011-08-26 Thread bsquared
On Fri, Aug 26, 2011 at 5:15 PM, Damien Radtke damienrad...@gmail.com wrote: Does anyone have some advice on how the Valencia/Anjuta vala completion works? I would like to work on creating a vim omnicompletion plugin for vala, and would like a little advice on how to get started in the right

Re: [Vala] Questions about structs: printing, copying, ArrayListStructType?

2011-08-24 Thread bsquared
On Tue, Aug 23, 2011 at 10:43 AM, Evan Nemerson e...@coeus-group.com wrote: On Mon, 2011-08-22 at 08:36 -0700, bsquared wrote: I ran into a couple of issues regarding structs. 1. When using a struct from a pkg, as opposed to one of my creation, an error is raised in the c code when attempting

Re: [Vala] Allowable to add user data to callback?

2011-08-22 Thread bsquared
After looking at the generated code and experimenting a bit, the fog has started to clear on this subject. More questions have been raised though, so I will have to ask in a new thread. Thanks for you help and patience. -- Regards, -Brian ___

[Vala] Questions about structs: printing, copying, ArrayListStructType?

2011-08-22 Thread bsquared
I ran into a couple of issues regarding structs. 1. When using a struct from a pkg, as opposed to one of my creation, an error is raised in the c code when attempting to access the built-in to_string() method for an element. Context.State state = ctx.get_state();

Re: [Vala] Allowable to add user data to callback?

2011-08-21 Thread bsquared
On Sun, Aug 21, 2011 at 1:02 AM, Luca Bruno lethalma...@gmail.com wrote: Something like the_method (() = { pa_state_cb (ctx, pa_ready); }); -- http://www.debian.org - The Universal Operating System Thank you. That works with some minor changes, but I don't understand why. Can anyone point

[Vala] Allowable to add user data to callback?

2011-08-20 Thread bsquared
Hello, I am trying to follow a c example for pulse audio and in it's setting of a callback it adds a userdata parameter. Can I do the same with vala? or should I use a field to store the userdata from the callback? The example [1] is approximating this... /// 8 from libpulse.vapi

Re: [Vala] Allowable to add user data to callback?

2011-08-20 Thread bsquared
On Sat, Aug 20, 2011 at 2:56 PM, Luca Bruno lethalma...@gmail.com wrote: https://live.gnome.org/Vala/FAQ#How_do_I_pass_user_data_to_a_callback.3F -- http://www.debian.org - The Universal Operating System Thanks for the quick response. I feel fairly thick because I don't understand how the

Re: [Vala] Allowable to add user data to callback?

2011-08-20 Thread bsquared
On Sat, Aug 20, 2011 at 3:50 PM, Luca Bruno lethalma...@gmail.com wrote: Then you probably want to take a look at the tutorial about lambda expression: https://live.gnome.org/Vala/Tutorial#Anonymous_Methods_.2BAC8_Closures I have looked at that, but it remains a mystery in some part. The

[Vala] pulseaudio device selection

2011-08-19 Thread bsquared
Hello, What packages would I use switch the audio device. For example... (1) The default the connector for the default audio output device is Analog Output. I would like to be able to quickly switch it to Analog Headphones. (2) If bluetooth headset is connected, I would like to be able to

Re: [Vala] pulseaudio device selection

2011-08-19 Thread bsquared
On Fri, Aug 19, 2011 at 10:52 AM, Dru Moore d...@dru-id.co.uk wrote: Depends on what system, software is involved. Could be Pulseaudio could be Alsa could be GStreamer that's just on Linux that I can think of. On 19 August 2011 18:25, bsquared bwcod...@gmail.com wrote: Hello, What

Re: [Vala] pulseaudio device selection

2011-08-19 Thread bsquared
On Fri, Aug 19, 2011 at 11:06 AM, Dru Moore d...@dru-id.co.uk wrote: Looks like the vapi is available from pulseaudio. At least according to: http://live.gnome.org/Vala/PulseAudioSamples dru I should have thought to search there. Thanks. -- Regards, -Brian

Re: [Vala] pulseaudio device selection

2011-08-19 Thread bsquared
On Fri, Aug 19, 2011 at 11:09 AM, bsquared bwcod...@gmail.com wrote: On Fri, Aug 19, 2011 at 11:06 AM, Dru Moore d...@dru-id.co.uk wrote: Looks like the vapi is available from pulseaudio. At least according to: http://live.gnome.org/Vala/PulseAudioSamples dru I should have thought

Re: [Vala] Fwd: Problem installing vtg under Debian Sid

2011-08-11 Thread bsquared
On Wed, Aug 10, 2011 at 10:36 PM, Serge Hulne serge.hu...@gmail.com wrote: -- Forwarded message -- From: Serge Hulne serge.hu...@gmail.com Date: Wed, Aug 10, 2011 at 10:30 PM Subject: Re: Problem installing vtg under Debian Sid To: Andrea Del Signore seje...@tin.it Thanks !

[Vala] Questions about webkitgtk: Inspector and contentEditable

2011-07-29 Thread bsquared
Hello, Does anyone have experience using the web inspector? I am trying to figure out how to make it visible. Also, I have not been able to get WebView.editable to work. I have to set contentEditable in html source. Is this a bug? If so should it be reported to vala or webkitgtk? --

Re: [Vala] libgdata or is it GData

2011-07-25 Thread bsquared
On Sat, Jul 23, 2011 at 2:25 PM, Luca Bruno lethalma...@gmail.com wrote: I feel like the code snippet used GData gir, since libgdata.vapi is buggy (that void* argument must be dropped). You can report a bug to http://bugzilla.gnome.org . I tried the sample using the GData-0.0.gir and it

Re: [Vala] libgdata or is it GData

2011-07-25 Thread bsquared
On Mon, Jul 25, 2011 at 12:20 PM, Luca Bruno lethalma...@gmail.com wrote: On Mon, Jul 25, 2011 at 12:15:34PM -0700, bsquared wrote: I tried the sample using the GData-0.0.gir and it worked. Is there a downside to using GData-0.0.gir rather than libgdata.vapi? There's an ongoing transition

Re: [Vala] libgdata or is it GData

2011-07-25 Thread bsquared
On Mon, Jul 25, 2011 at 1:11 PM, Luca Bruno lethalma...@gmail.com wrote: On Mon, Jul 25, 2011 at 01:04:27PM -0700, bsquared wrote: Is that a recommendation to use the gir? Temporarily. I tried briefly to generate a VAPI file, but I have not succeeded yet. If you were able to use the gir

[Vala] libgdata or is it GData

2011-07-23 Thread bsquared
I am looking for a vala example using GData. I keep getting errors on the one I have found. https://code.launchpad.net/~doctormo/.../gdata-vala-experiments I want to access documents and spreadsheets. -- Regards, -Brian ___ vala-list mailing list

Re: [Vala] libgdata or is it GData

2011-07-23 Thread bsquared
On Sat, Jul 23, 2011 at 1:04 PM, Luca Bruno lethalma...@gmail.com wrote: First rule is to paste the errors, we can't help otherwise :) Sure, thank you. I get the following error running the code snippet I found as is. gdata_experiments.vala:26.24-26.75: error: 1 missing arguments for

Re: [Vala] How to view Valadoc in Devhelp

2011-07-11 Thread bsquared
On Sun, Jul 10, 2011 at 11:41 PM, Luca Bruno lethalma...@gmail.com wrote: On Mon, Jul 11, 2011 at 08:22:50AM +0800, linmx0130 wrote: Hi all, I hope to view valadoc in devhelp.What should I do? Sorry for my impoliteness last time. Thanks everyone who will answer me. Valadoc in general can

Re: [Vala] How to install valadoc?

2011-07-05 Thread bsquared
On Tue, Jul 5, 2011 at 12:59 PM, Christian Siefkes christ...@siefkes.net wrote: Hi, I would like to install valadoc on my system (Ubuntu Natty), but I don't know how. Since I didn't find any prepackaged packages, I cloned the git repo from git://git.gnome.org/valadoc. The INSTALL file says:

Re: [Vala] webkitgtk-3 how-to?

2011-07-03 Thread bsquared
On Sat, Jul 2, 2011 at 11:11 PM, Frederik scumm_fr...@gmx.net wrote: Yes, you must copy  webkit-1.0.vapi to webkitgtk-3.0.vapi  webkit-1.0.deps to webkitgtk-3.0.deps then edit webkitgtk-3.0.deps and replace  gdk-2.0 with gdk-3.0  gtk+-2.0 with gtk+-3.0 Afterwards you can compile your