Hi Tom,
On Tue, Oct 25, 2011 at 06:14:37PM +0100, Tom medhurst wrote:
> Hi Guys,
>
> Trying to create a Clutter.ListModel in python using GObject Introspection..
> Probably doing something wrong, but can't see what it is..
>
> from gi.repository import GObject, Clutter, Mx
> Clutter.init(["--clutter-debug=all"])
> m=Clutter.ListModel()
> m.newv(1, GObject.type_from_name("gchararray"), "name")
> *BANG*
> *Segmentation Fault*
calling Clutter.ListModel() already creates the instance, so there's no
need to call the constructor again.
> ...Also newv only takes "4" args (incl. *self*), so how do I specify more
> than one column?
hmm, looks like clutter_list_model_newv is missing some GI annotations.
> If someone could provide me with a working version of the code above, that
> would be awesome!
model = Clutter.ListModel()
model.set_types([int, str, Clutter.Actor])
model.set_names(["anint", "astring", "anactor"])
> uname -r:
> *Linux %HOSTNAME% 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC
> 2011 i686 i686 i386 GNU/Linux*
>
> python -V:
> *Python 2.7.2+*
>
> clutter is version 1.0-0 and libmx is version 1.0-2
clutter-1.0, seriously?
so long
:wq buz
--
/* After several hours of tedious analysis, the following hash
* function won. Do not mess with it... -DaveM
*/
2.2.16 /usr/src/linux/fs/buffer.c
GnuPG Fingerprint: 2FFF FC48 C7DF 1EA0 00A0 FD53 8C35 FD2E 6908 7B82
signature.asc
Description: Digital signature
_______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
