Re: [Vala] Manual VAPI writing

2010-07-01 Thread Abderrahim Kitouni
oops, forgot to reply to all.

2010/7/1, Abderrahim Kitouni a.kito...@gmail.com:
 Hi,

  2010/6/30, Harry Van Haaren harryhaa...@gmail.com:

Any pointers as to how to do this? Cheers, -Harry
 Use cprefix= - maybe you also need to set cname=int in order to have
 Vala know what to call the type of the values.

  
  
   Yes! Thanks, that worked a charm.
  
  
Next stumbling block found:
when opening a file,  sf_open(...)  is called. To close the file,
sf_close(file)  must be called.
  
[CCode (cheader_filename=sndfile.h,cname =SNDFILE)]
class Sndfile
{
   [CCode (cname=sf_open, free_function=sf_close)]
   public Sndfile(string path, FileMode mode, out Info sf_info );
}

 free_function should be set on the class, not the constructor. Valac
  should probably warn on unreconized annotations.
  btw, your class should be compact.


  HTH,

 Abderrahim

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Graphic toolkits for Vala?

2010-07-01 Thread CaStarCo
Hello,

the last days i was fighting with some linux diagram editors (such as dia,
umbrello, argouml...). And these programs don't cover my needs.

At the end i thought may be i could make a program to help me to create
beautiful diagrams.. but never i made a program that works with editable
graphic elements.

¿Whic libraries should i use? (Probably i'll program it with Vala)

I thought in clutter and/or cairo, but i don't know if these libraries do
that i think they do .

Thanks in advance

-- 
- Per la llibertat del coneixement -
- Per la llibertat de la ment...   -
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] how to access the length attribute of multi dimensional arrays?

2010-07-01 Thread Seth Hoenig
So if I pass a matrix to a function (or any multidimensional array), I can
only seem to access the .length attribute of the first dimension. Is there a
way to access the .length attributes of the other dimensions of the array?

public Something(int[,] arr)
{
_n_rows =  arr.length;
_n_cols =   arr[0, ].length; // no compile :(
}

In the example above, I can't seem to find a way to find out how many
columns are in my matrix.
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] how to access the length attribute of multi dimensional arrays?

2010-07-01 Thread Harry Van Haaren
Hey,

I've no experience with Multi-Dimensional arrays in Vala, but I can quote a
tutorial:
http://live.gnome.org/Vala/ValaForJavaProgrammers#Arrays

It provides the basics of Vala for Java programmers (me.. in college ;-(
but also has a piece that might be of intrest to you.

HTH, -Harry

On Fri, Jul 2, 2010 at 12:26 AM, Seth Hoenig seth.a.hoe...@gmail.comwrote:

 So if I pass a matrix to a function (or any multidimensional array), I can
 only seem to access the .length attribute of the first dimension. Is there
 a
 way to access the .length attributes of the other dimensions of the array?

 public Something(int[,] arr)
 {
 _n_rows =  arr.length;
 _n_cols =   arr[0, ].length; // no compile :(
 }

 In the example above, I can't seem to find a way to find out how many
 columns are in my matrix.

 ___
 vala-list mailing list
 vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Graphic toolkits for Vala?

2010-07-01 Thread Didier 'Ptitjes'
On 07/02/10 01:05, CaStarCo wrote:
 At the end i thought may be i could make a program to help me to create
 beautiful diagrams.. but never i made a program that works with editable
 graphic elements.
 
 ¿Whic libraries should i use? (Probably i'll program it with Vala)

Maybe a vala binding for FlowCanvas could help you.
http://drobilla.net/software/flowcanvas/

Check Patchage, Ingen and Machina to see its capabilities...

Best regards, Didier.
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list