Forum Discussion
Travonisoft
11 years agoVisitor
One would think that you could create a listener object that would just listen and do work in the background and load to appropriate location when completed.
Instead I have to do something like
If you don't use the wait function then you will never get the image.
And if the messagePort is a global port and it gets a message for the imageRequest completing then subsequent code will block even if user is pressing buttons because it is on the same msgPort
Why would you not design this language to keep the UI Controls and Data Management explicitly on separate threads?
Instead I have to do something like
mgr.RequestTexture(request)
msg=wait(0, msgport)
if type(msg)="roTextureRequestEvent" then
state = msg.GetState()
if state = 3
bitmap = msg.GetBitmap()
if type(bitmap)<>"roBitmap" then
'print "Unable to create robitmap"
else
'print "There was great success"
end if
end if
end if
If you don't use the wait function then you will never get the image.
And if the messagePort is a global port and it gets a message for the imageRequest completing then subsequent code will block even if user is pressing buttons because it is on the same msgPort
Why would you not design this language to keep the UI Controls and Data Management explicitly on separate threads?