gdk-pixbuf-2.0 vapi hasn't been updated : all methods which end with _async
are async methods. please use this "old" creation method :

Gdk.Pixbuf pixbuf = null;
Gdk.Pixbuf.new_from_stream_at_scale_async.begin (stream, 100, 100, true,
null, (obj, res) => {
pixbuf = Gdk.Pixbuf.new_from_stream_at_scale_async.end (res);
});




2014-04-09 1:31 GMT+02:00 escoand <[email protected]>:

> Hi.
>
> I use Gdk.Pixbuf.from_stream_at_scale_async but for me it's clear how to
> handle it correctly.
>
> How can I add this pixbuf to an IconView? I don't get it right, apparently.
>
> I tried:
>
>    var file = File.new_for_uri(media.getIconURL());
>    var stream = file.read();
>    new Gdk.Pixbuf.from_stream_at_scale_async(stream, 100, 100, true);
>
> But an error is thrown:
>
>    ...vala.c: In function 'upn_pplayer_on_media_available':
>    ...vala.c:645:50: error: '_data_' undeclared (first use in this
> function)
>         _tmp31_ = gdk_pixbuf_new_from_stream_finish (_data_->_res_,
>
>  &_inner_error_);
>                                                      ^
>    ...vala.c:645:50: note: each undeclared identifier is reported only
>                            once for each function it appears in
>
> Can you please give me a hint?
> Thanks in advance.
> escoand
>
> _______________________________________________
> vala-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to