Re: libseed-list ConversionError



Thanks, Alan

On Mon, 2010-12-06 at 10:31 +0800, Alan Knowles wrote:
> From the manual about set_types..
> Sets the types of the columns inside a ClutterModel. This function is meant primarily for GObjects that inherit from ClutterModel, and should only be used when contructing a ClutterModel. It will not work after the initial creation of the ClutterModel.
> 
> Although I'm not sure that's causing the problem
> 
> Looking at the gir, you might try
> model.set_types([GObject.TYPE_INT, GObject.TYPE_PIXBUF]);
that's what I tried as well, however the INT value is needed, otherwise
the Clutter-Error:
Clutter-CRITICAL **: clutter_model_set_types: assertion `n_columns > 0'
failed is raised

using:
model.set_types(2, [GObject.TYPE_STRING, GObject.TYPE_INT]);

works fine, although this is not the types I need...

Looking at the Clutter manual, it suggests using Gdk.TYPE_PIXBUF. Using:

model.set_types(2, [GObject.TYPE_STRING, Gdk.TYPE_PIXBUF]);

creates the following error:

(seed:7931): Clutter-CRITICAL **: clutter_model_set_types: assertion
`priv->column_types == NULL' failed

** (seed:7931): CRITICAL **: Line 214 in test.js: ConversionError Can
not convert Javascript value to int

 
> as the length argument may be generated from the length of the array. (need to check seed source to see if it's doing that.)
> 
> Looks like the newv constructor method has got the wrong hints at present, as it's creating the array as an out argument, rather than an array of types.
> 
> Regards
> Alan
> 
>  --- On 05/Dec/2010, tomw wrote: 
> > Hi, 
> > 
> > I recently started to use JS with seed for some Cutter application.
> > It's really a great framework especially when using GObject
> > introspection. Creating a Clutter.ListModel I ran into some issues which
> > I could not resolve so far. The statement:
> > 
> > model.set_types(2, [GObject.TYPE_INT, GObject.TYPE_PIXBUF]);
> > 
> > return the following error: 
> > 
> > ConversionError Can not convert Javascript value to int
> > 
> > any idea?
> > 
> > Thanks.
> > 
> > _______________________________________________
> > libseed-list mailing list
> > libseed-list gnome org
> > http://mail.gnome.org/mailman/listinfo/libseed-list
> 
> _______________________________________________
> libseed-list mailing list
> libseed-list gnome org
> http://mail.gnome.org/mailman/listinfo/libseed-list




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