Cell update signal in GtkSheet
| From: | Jake Gordon | Date: | Mon, 11 Jul 2005 15:52:09 +0000 |
| Subject: | Cell update signal in GtkSheet | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-5960@lists.php.net to get a copy of this message | ||
I'm using a GtkSheet which takes data from a database and enables the user to edit that data. The documentation for GtkSheet seems to be very poor:
http://gtk.php.net/manual/en/extra.gtksheet.php
... notably, it says nothing of the sheet's signals.
I can get data into the sheet fine from the database (e.g. $sheet->set_cell($row, $col, 1, $data); ). But how do I update the database when a cell is changed? If I need to connect a function to the cell itself rather than the sheet, how do i reference that cell? Or how is this done?
I can run:
$sheet->connect("changed","update_db");
... but there are 3 problems with this.
First, this connects the sheet not the cell in question, so if this is the way to do it i'd also need to send the row and column reference.
Second, this event is also given when loading the sheet for the first time, which is not desired
Third, this event is called between every key press within a cell. I only want it to be called when I've finished editing a cell and changed focus to another cell.
---
Perhaps best is if someone can point me to some better documentation for this and similar issues on GtkSheet. I'm using:
http://gtk.php.net/manual/en/extra.gtksheet.php
... at the moment.
Thanks,
Jake.