Never mind I got it. Use (255, 255, 255, 255) instead of 0xffffff
On Sat, Jul 19, 2008 at 12:27 PM, Chandan Pitta <[EMAIL PROTECTED]>
wrote:
> Another quick question. I am trying to create a Text widget in candy like
> so:
> Text(None, None, "hello world", font, 0xffffff, None)
>
> and I get this exception:
> File
> "/home/chandanp/workspace/usr/local/lib/python2.5/site-packages/kaa/candy/widgets/text.py",
> line 84, in set_color
> super(Text, self).set_color(clutter.Color(*color))
> TypeError: type object argument after * must be a sequence
>
> By the way what does * do in python (like *color above)?
>
>
>
> On Sat, Jul 19, 2008 at 11:36 AM, Chandan Pitta <[EMAIL PROTECTED]>
> wrote:
>
>>
>>
>> On Sat, Jul 19, 2008 at 11:12 AM, Dirk Meyer <[EMAIL PROTECTED]> wrote:
>>
>>> "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.
>>>
>>
>> That worked. Thank you for the quick reply!
>>
>>
>>>
>>>
>>> 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
>>>
>>
>>
>
-------------------------------------------------------------------------
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