Accessing label.text via thread causes a crash

Hey there,
1st of all my “whole” code:
Thread Run Event:

if Label1.text="Bla" then else MsgBox "Dsn" end if
I have just a simple Desktop App with a button, a label and a thread in the main window.
The button fires the thread and the app crashes with a “thread accessing ui exception”
I dont know why that doesnt work, can anyone help me?
Thanks in advance :slight_smile:

Edit: The version used before was RealBasic2012r2 (it worked there)

Accessing the UI from a thread is no longer supported… please read other topics on this forum discussing this exact situation

Ok… thought so after i read it in the documentation.
Just gonna create a property and fill it the text. Thanks anyway Dave :wink:

As of Xojo 2013r3, you cannot access UI elements from thread. For more information and techniques on how to change your code: