RE: [PHP-GTK] $list->selection
| From: | Edward A. McLain | Date: | Tue, 13 Mar 2001 18:36:53 +0000 |
| Subject: | RE: [PHP-GTK] $list->selection | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-806@lists.php.net to get a copy of this message | ||
Sorry.. My bad.. I was doing some testing and forgot to correct some
things before
I sent it out to you.. :)
Anyways,
This:
function handle_select($gtkwidget, $row, $column, $even)
{
$blah = $gtkwidget->get_text($row, 0, $bleh);
if ($blah) {
print "you clicked on $bleh\n";
}
print "value could not be retrieved.\n";
}
}
Should be:
function handle_select($gtkwidget, $row, $column, $even)
{
$blah = $gtkwidget->get_text($row, $column, $bleh);
if ($blah) {
print "you clicked on $bleh\n";
}
print "value could not be retrieved.\n";
}
}
$blah is the return identifier on whether or not the function could get
the text. $bleh is
the actual text that was in the field.
From my experience on this so far, the actual documentation on the
gtk.org website is
a better reference for the functions that anything. They are usually
very close to the
way php-gtk calls them..
Later,
Edward McLain
Pinnacle Data Systems, LLC.
(205)942-1002 ext 12
************************************************************************
**
Whoever said nothing is impossible never tried slamming a revolving
door.
-----Original Message-----
From: Iuri Fiedoruk [mailto:bart@avalon.sma.zaz.com.br]
Sent: Tuesday, March 13, 2001 12:14 PM
To: Edward A. McLain; PHP-GTK (E-mail)
Subject: Re: [PHP-GTK] $list->selection
Em Seg 12 Mar 2001 14:17, Edward A. McLain escreveu:
> should be:
> $list->connect('select-row', 'function name to call');
> that's it.. it then passes the GTK Widget, row, column, and event.. so
> forinstance:
>
> $list->connect('select-row', 'hanlde_select');
>
> function handle_select($gtkwidget, $row, $column, $even)
> {
> $blah = $gtkwidget->get_text($row, 0, $bleh);
> if ($blah) {
> print "you clicked on $bleh\n";
> }
> print "value could not be retrieved.\n";
> }
> }
>
>
Well, I've changed my list to clist. But I'm having a problem,
$gtkwidget->get_text($row, 0, $bleh); returns 1 everytime.
$row is all right. What is the 3th argument on get_text? On perl-gtk
there
only two, row and col.
Any clues?
--
Iuri Fiedoruk
Santa Maria, RS, Brazil