Thank you swiftcoder, i'll have a look at the performance hit and see if i 
can optemize it some how.. or if i'll scrap my idea and go another 
direction if the solutions that comes out of this is to slow for my 
purposes.

On Tuesday, February 5, 2013 12:15:11 AM UTC+1, Lord Anton Hvornum wrote:
>
> I have a scenario where:
>
>     class main(pyglet.window):
>        ...
>        generates a lot of objects
>     
>        sends a label to another thread
>     
>     class the_thread(Thread):
>        ...
>        tries to:
>            self.lable.text = 'New string'
>            self.lable.draw()
>
> Which causes:
>
> > GLException: invalid operation
>
>
> Even keeping the .draw() part in the main thread and just update the text 
> causes the error.
> Using the "lock" function via  self.lable.being_update() and then calling 
> .end_update() causes the error.
>
> The code i've got works fine if i take away the Threading part, which, i 
> don't because the whole idea with the thread is to have a socket and some 
> processing operations being performed at X times / minute under different 
> circumstances.
>
>
> Any idea if it's possible to solve at all?
> Can i hook the thread objects to the main window resorce somehow or blit 
> it into the main instance? I **think** i've solved this once back in the 
> days when i was programming at a helpdesk by blitting the object into a 
> "scene" or something but i can't find my code, and it might not even have 
> been based on Pyglet to begin with.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to