Re: Cell update signal in GtkSheet
| From: | Alan Knowles | Date: | Tue, 12 Jul 2005 01:41:35 +0000 |
| Subject: | Re: Cell update signal in GtkSheet | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5989@lists.php.net to get a copy of this message | ||
It's been a long while since I looked at this, but from what I remember
adding the traverse signal involved a few changes to php-gtk's internal
signal handling code.
Unfortuntaly, Andrei reverted the changes in the last release, so I
suspect you may have problems with it.
Regards
Alan
On Mon, 2005-07-11 at 16:58 +0100, Jake Gordon wrote:
> Generally, it would be great to see *any* code anyone's written that has
> gtksheets in it, as this would be documentation by example.
>
> Jake
>
> Jake Gordon wrote:
> > 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.
> >
>