Re: [Vala] regex to get some multiline text

2012-05-09 Thread san hoi
https://live.gnome.org/Vala/User:Decora/string.split%20and%20string.join Would you use string.split? slice index notation [-1] is like a bit strange... (ex: footer[-1] int main () { string the_string = start text line 1 start text line 2 %tag:keytag% the content betwen tag

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

2011-09-04 Thread san hoi
Sorry for late response. $ 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 -shared -o test_shared.dll It's works, No problem. [Output files: dvw-0.1.vapi and test_shared.dll.] Thanks. 2011/9/2, Tal Hadad

[Vala] How to make shared library in win32?

2011-08-31 Thread san hoi
I try to build libdvw shared library. But following error occur. https://live.gnome.org/Vala/SharedLibSample http://gitorious.org/libdvw/libdvw toddw@TODDW-PC /C/msys/home/toddw/libdvw/dvw (master) $ valac --pkg config --pkg gtk+-2.0 --pkg gee-1.0 --pkg libxml-2.0 --vapidir=../vapi/ *.vala

Re: [Vala] Development on Windows

2011-07-27 Thread san hoi
Hi. I try to check it. I reproduce this issue. http://live.gnome.org/Vala/HackingValaUsingMonoDevelop http://addins.monodevelop.com/ http://monoaddins.codeplex.com/releases/view/63940 http://geocities.yahoo.co.jp/gl/moto62kg/comment/20100916/1284936718 However, vala language support for

Re: [Vala] EOF problems

2011-07-15 Thread san hoi
python's case : https://gist.github.com/f0ff2c3c66e6a5842e70 python return '' as EOF. but I don't know how to do well it with vala... Sorry that I can't be of a help. 2011/7/16, Luca Bruno lethalma...@gmail.com: On Fri, Jul 15, 2011 at 10:57:21PM +0200, Stefan Risberg wrote: I am trying to

Re: [Vala] Proposal for a an alias (a symbol) for the keyword unowned

2011-06-23 Thread san hoi
http://stackoverflow.com/questions/1814922/what-does-this-mean-in-pascal 1. more implicit access : C's - http://live.gnome.org/action/diff/Vala/Tutorial?action=diffrev1=214rev2=215#line-1652 2. more explicit argument passing go usage case:

Re: [Vala] HELP GLib.DateTime (TimeZone = 0) on Windows

2011-06-09 Thread san hoi
http://docs.python.org/library/datetime.html#datetime.tzinfo https://gist.github.com/1018279 lack timezone conversion? AFAIK, UTC is world only one stuff... ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] Initialize struct error occure in dova-os.vapi.

2011-05-19 Thread san hoi
I use git version both vala and dova-core. I try to build dova-core yesterday. os.tm() no default constructor? error occure. So I edit os/dova-os.vapi, append constructer to several internal struct. build passed, but test is stop. valac --profile=dova base.vala string.vala list.vala

Re: [Vala] Remove line numbers from logging

2011-04-30 Thread san hoi
hi. 1. make simple custom function. // https://bugzilla.gnome.org/show_bug.cgi?id=546043 class Test { static int blah(int test) throws GLib.Error { if (test 0) throw new GLib.Error(GLib.Quark.from_string(test), 0, test error); return 5; } static void

[Vala] using __doc__ for partial sequential test?

2011-04-22 Thread san hoi
10years ago, make doctest by tim peters. http://groups.google.com/group/comp.lang.python/msg/1c57cfb7b3772763?pli=1 doctest issue is following. http://stackoverflow.com/questions/5522334/python-does-unittest-have-something-that-doctest-hasnt

[Vala] How to receive error message which vala's compiler output.

2011-03-24 Thread san hoi
Sorry for sending next one more question to list. I try to receive error message which vala's compiler output. f=file(data.out, w) cmd = valac -v hello.vala p=subprocess.Popen(cmd, shell=True, stdout=f, stderr=subprocess.PIPE) errcode=p.wait() f.close() for line in file(data.out): ...

[Vala] vala + gtk+-3.0 ?

2011-03-23 Thread san hoi
vala : 0.10.7 os : fedora 15 I try to compile customwidget sample in gtk+-3.0. ( http://live.gnome.org/Vala/CustomWidgetSamples#Subclassing_Gtk.Widget ) but it cannot work. $ valac --pkg gtk+-3.0 widget.vala widget.vala:26.5-26.37: error: ValaWidget.size_request: no suitable method found to

[Vala] vala regex question.

2010-11-19 Thread san hoi
// hello.cs using System; using System.Text.RegularExpressions; class HelloWorld { public static void Main() { System.IO.StreamReader sr = new System.IO.StreamReader(@/opt/the-board/share/vala-0.12/vapi/cairo.vapi); string gscode = sr.ReadToEnd(); sr.Close();

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

2010-11-03 Thread san hoi
I try to use python library in genie, (I choose simply process kick aproach...) and so I face two problem. 1. equivarent code in genie that os.poppen(python output_token_value.py) 2. definition style infomation in genie (from pygments.styles.colorful import ColorfulStyle part) I'd like to port

Re: [Vala] How I do dump elements in global namespace?

2010-08-06 Thread san hoi
umm... i see. I maybe find minor bug about namespace. I files it as 625996. Thanks. 2010/8/3, Phil Housley undeconstruc...@gmail.com: On 3 August 2010 14:26, san hoi hoisa...@gmail.com wrote: Hi. When I read vala-tutorial, I find fellowing sentense. http://live.gnome.org/Vala/Tutorial

[Vala] How I do dump elements in global namespace?

2010-08-03 Thread san hoi
Hi. When I read vala-tutorial, I find fellowing sentense. http://live.gnome.org/Vala/Tutorial#Namespaces If you have to reference the global namespace explicitly due to ambiguity you can do that with the global:: prefix. I often use globals() in python. How I can enumerate its in vala? Thanks.

[Vala] How to make brownian tree in vala?

2010-06-14 Thread san hoi
http://rosettacode.org/wiki/Brownian_tree I look for graphic library like javascript+canvas. fellow euclid.py and pytweener.py based library. http://wiki.github.com/tbaugis/hamster_experiments/tutorial I think that it's good approach. And though I also think that difficult way in my vala's

[Vala] tuple in list manipulation question

2010-05-21 Thread san hoi
1. string = string[] = List(Tuple(a1,b1), ...) = Dict(a1: b1, ...) items 2. string = string[] = List(Tuple(a1,b1,c1), ...) = double loop I would like to do well in first case. Is there a better way to do this? Regards. [1] http://codepad.org/md9P4cTf [2] http://codepad.org/bHUR2Dgg

Re: [Vala] Gee.ReadOnlyMap could not be found?

2009-12-24 Thread san hoi
Thanks! Use Gee.Map as type and use my_map.read_only_view to retrieve the read-only view for my_map. umm...but I don't know how to use it. Is there a sample code? 2009/12/23, Didier 'Ptitjes' ptit...@free.fr: Didier 'Ptitjes' wrote: Hi, [Cross-posting on gee-l...@gnome.org] san hoi wrote

Re: [Vala] Gee.ReadOnlyMap could not be found?

2009-12-24 Thread san hoi
public Gee.Mapstring,Wiz.File streams { get { return _streams.read_only_view; } ok. sorry, I'm not familiar with c# property. but now, i see it, so it's no problem. thanks. 2009/12/24, Didier 'Ptitjes' ptit...@free.fr: san hoi wrote: Thanks! Use Gee.Map as type and use

[Vala] Gee.ReadOnlyMap could not be found?

2009-12-23 Thread san hoi
Hi, I try to build wizbit tar.gz snapshot. (http://git.codethink.co.uk/?p=wizbit;a=summary) my emvironment: vala 0.7.9 (official tar.bz2) libgee-0.5 (git clone git://git.gnome.org/libgee) [my...@localhost wizbit]$ make make all-recursive make[1]: Entering directory `/home/mymas/wizbit' Making

[Vala] yajl vala binding?

2009-12-05 Thread san hoi
hi! I'm search yajl binding. but i cannot find vala's binding... umm, Who do you wrap yajl api in vapi files? i'm cannot making vapi. i need that vapi = c api tutorials... http://www.ibm.com/developerworks/linux/library/l-wrap/ http://lloyd.github.com/yajl/yajl-1.0.5/files.html thank.