"Chandan Pitta" wrote:
> This is so silly, but I am not able to understand how to add an image to a
> candy stage. Here is the code I used:
>
> kaa.candy.init()
> window_size = (1360, 768)
> stage = kaa.candy.Stage(window_size)
> img = kaa.candy.widgets.Image(None, None, skin.get_background_image())
> stage.add(img)
>
> And here is what I get:
> (/home/chandanp/workspace/python/newvo/src/main.py:5515): Clutter-CRITICAL
> **: texture_init_tiles: assertion `x_pot != 0 || y_pot != 0' failed
>
> (/home/chandanp/workspace/python/newvo/src/main.py:5515): Clutter-CRITICAL
> **: texture_upload_data: assertion `priv->x_tiles != NULL && priv->y_tiles
> != NULL' failed

You mix up the two threads. Clutter has its own threads to get
animations running even when the mainloop is busy. Maybe stage.add
should be thread safe in the future, for now use the
kaa.candy.threaded decorator:

| kaa.candy.init()
| 
| @kaa.candy.threaded()
| def execute_this_in_clutter():
|     window_size = (1360, 768)
|     stage = kaa.candy.Stage(window_size)
|     img = kaa.candy.widgets.Image(None, None, skin.get_background_image())
|     stage.add(img)
| 
| execute_this_in_clutter()

This will force the execution of execute_this_in_clutter into the
clutter loop.


HTH


Dischi

-- 
Life is complex, it has a real part and an imaginary part.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to