Re: Xmms::Remote



AvA wrote:

I did it with a Gtk->timeout_add(100 ,\&monitor);

sub monitor {
$test = $remote->get_playlist_title;
$entry->set_text("$test");
}

One would expect that this works, but it doesn't.
So I added a print"" to the subroutine:

sub monitor {
$test = $remote->get_playlist_title;
$entry->set_text("$test");
print "";
}

and all works fine.

That's because print() returns true, and $entry->set_text() obviously 
returns false. A timeout callback has to return true, otherwise the 
timeout will be disabled.

Regards,

Joern

-- 
Joern Reder
supporting:   http://www.zyn.de/
unbelievable: http://www.exit1.org/
CPAN:         http://www.perl.com/CPAN/modules/by-authors/id/J/JR/JRED



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