Re: Gtk2::CellRendererSpinButton-Z

On Mon, 6 Mar 2006 22:32:57 -0500
muppet <scott asofyet org> wrote:

On Mar 6, 2006, at 3:57 PM, zentara wrote:

Here is a working package, for the

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  

    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. :-)


I'm not really a human, but I play one on earth.

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