Re: Gtk2::CellRendererSpinButton-Z
- From: zentara <zentara1 sbcglobal net>
- To: muppet <scott asofyet org>
- Cc: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: Gtk2::CellRendererSpinButton-Z
- Date: Tue, 7 Mar 2006 17:06:06 -0500
On Mon, 6 Mar 2006 22:32:57 -0500
muppet <scott asofyet org> wrote:
On Mar 6, 2006, at 3:57 PM, zentara wrote:
Hi,
Here is a working package, for the
Gtk2::CellRendererSpinButton.
It sets initial value, updates itself, and sets
new initial value at each edit.
I use a package global to hold the current value,
and if anyone knows a better way, my ears are open. :-)
You don't need the global at all. You pass the new value through
the "new value" parameter of the edited signal. The cell renderer
sub SET_PROPERTY {
my ($self, $pspec, $val) = @_;
$self->{ $pspec->get_name } = $val;
# set the initial editing value
if ($pspec->get_name eq 'value') {
$cur_val = $val;
}
}
After you remove the global, you have a SET_PROPERTY which is merely
a perl implementation of what the XS code already does.
Yes, I am humbled. :-) I caused all these problems for myself, by upgrading
to Perl 5.8.8 , while not getting the latest Glib and Gtk-1.116 perl modules.
I should have read more closely the post by Daniel Kasak a few days ago
concerning this.
So all of the above module hacking....... is just BS caused by me not noticing
the upgrade problems.
Sorry I wasted your time, but I sure learned alot. :-)
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]