ThreadAccessingUIException

“A thread has attempted to manipulate a user interface element. This can only be done from the application’s main thread.”

Is there no way to have a thread “manipulate a user interface element” ?

Is this just a Xojo problem?

when it was Real Basic, I had no problem using a thread to change things around.

[quote=146731:@Robert Dunn]“A thread has attempted to manipulate a user interface element. This can only be done from the application’s main thread.”

Is there no way to have a thread “manipulate a user interface element” ?

Is this just a Xojo problem?

when it was Real Basic, I had no problem using a thread to change things around.[/quote]

The new supported platforms require that. Read http://documentation.xojo.com/index.php/Thread

Usually, the trick is to place the code that manipulates the UI in a 0 ms timer. If you need to pass variables, subclass the timer and add public properties to it.

We come a long way. When 64 bits builds come, we may even have multicore threading. Anything like the good’ol time slicing threading à la Real Basic is out of question.

These things are not connected in our framework.

I am not saying they are here :wink:

[quote=146731:@Robert Dunn]“A thread has attempted to manipulate a user interface element. This can only be done from the application’s main thread.”
Is there no way to have a thread “manipulate a user interface element” ?
[/quote]
No
It’s never really been safe

No
Most UI toolkits (Cocoa, Windows, GTK) are not thread safe
This is a common problem in any language that uses UI - they deal with it in different ways

It was actually unsafe then as well.
But, in Carbon apps, the runtime was such that you would almost never see a problem - but they still could happen.