Re: [Vala] Hello and some questions!



Hi Andrea,

On Die, 2006-10-03 at 14:51 +0200, Andrea Del Signore wrote:
I'm Andrea, I found Vala few days ago and it looks very interesting. I'm
still in the process of learning it so forgive me for any *imprecision*
that I can write.

Thanks for trying out Vala. We'll hopefully soon provide more
documentation to make it easier to learn the language.

During my tests I manage to use a callback function, it works, but the C
compiler give me a warning (invalid cast or something similar). So I
tried to explicitly cast my function with the callback type and valac
(svn revision 137) gives me a segmentation fault *during* compilation. 
I reduced my program to this code snippet to isolate the problem:

These are both Vala compiler bugs. The explicit cast should not be
necessary, the C warning will be fixed. The crash is fixed in SVN r138.

Everythig compile fine, but if I try with the more appropriate keyword
"interface" (GstXOverlay is a GObject interface) the generated C code of
for this vala line:
      ((XOverlay)message.src).set_xwindow_id(test.anid);

will be something like:

gst_x_overlay_set_xwindow_id (GST_XOVERLAY(message->src), test->anid);

but GST_XOVERLAY(...) is not defined in gst.h, GST_X_OVERLAY(...) is!

The conversion from camel case to upper case fails here as not all
packages adhere to the exact same conversion rules. It's not possible
yet to manually override the lower/upper case cname in classes and
interfaces but I'll add this as an attribute as soon as possible.

Regards,

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]