Re: Dynamic Build Types for GtkListStore.
| From: | Eddie Hixson | Date: | Fri, 07 Apr 2006 12:47:50 +0000 |
| Subject: | Re: Dynamic Build Types for GtkListStore. | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6841@lists.php.net to get a copy of this message | ||
Andrei,
Thank you for response and quick fix in the code. That is exactly what
I was looking to do in my application. The program is working but does
create this CRITICAL ERROR.
(sm_MySql.php:16162): Gtk-CRITICAL **: gtk_list_store_set_n_columns:
assertion `n_columns > 0' failed
Is this error related to your new implementaion of the override?
OR
Do I have another issue I need to be looking for?
"YOU ARE THE MAN"
Regards,
Eddie
On Thu, 2006-04-06 at 22:19 -0700, Andrei Zmievski wrote:
> All right, it's in the CVS.
>
> $store = new GtkListStore();
> $store->set_column_types(array(Gtk:TYPE_STRING, Gtk::TYPE_LONG)); //
> and so on
>
> -Andrei
>
>
> On Apr 6, 2006, at 8:37 PM, Andrei Zmievski wrote:
>
> > Excellent question! Gtk+ allows you to do it via creating an empty
> > GtkListStore and then using gtk_list_store_set_column_types(). I
> > will implement the override for this method shortly.
> >
> > -Andrei
> >
> >
> > On Apr 6, 2006, at 1:04 PM, Eddie Hixson wrote:
> >
> >> Hi,
> >>
> >> I need help. I have tried all I know how to do to dynamically build a
> >> string for the TYPES to build a GtkListStore.
> >>
> >> In the example below I all ready know I have 11 items and build the
> >> store this way and all works fine.
> >>
> >> $store = new GtkListStore(
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING,
> >> Gtk::TYPE_STRING
> >> );
> >>
> >> What I would like to do is build the store types on the fly based
> >> on the
> >> number columns and data types I may have at the time of a query
> >> result
> >> is returned which has a different number of columns and datatypes.
> >>
> >> Be easy on me. I am a newbie.
> >>
> >> Thanks,
> >> Eddie
> >>
> >> --
> >> PHP-GTK General Mailing List (http://gtk.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> > PHP-GTK General Mailing List (http://gtk.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>