Re: [Vala] using IOChannel.add_watch in a class



On Wed, Aug 6, 2008 at 6:59 PM, Levi Bard <taktaktaktaktaktaktaktaktaktak gmail com> wrote:
If you use a non-static method as the callback, you can access the
current object's members from within the callback.

Hi,
I already did that and got a nasty segfault. Here is the code
http://git.freesmartphone.org/?p=openmoko-gsoc2008.git;a=blob;f=odeviced/src/plugins/idlenotifier/idlenotifier.vala;h=ea9c2d89ecde303f46b2ca28a9f790479147e4ff;hb=4d80c8770f42074ac44d95c4ea49e909d309eee1

lines 73-84.
However when I declare the callback as a static method, the code doesn't segfault and the callback is getting called properly. But this isn't much helpful since I don't have the reference to the current object. Any hints will be gratefully appreciated.

Thanks
Sudharshan S

@Levi: Sorry for the last one, forgot to hit "Reply All".



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