[Vala] problems with Gdk.Pixbuf.from_stream_at _scale_async



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



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