Having a problem I'm finding really hard to debug.
In a script module, I'm using Globals.Security.Login() to switch between users and switch to the application default window on successfull login. Sometimes though, I'm getting this exception "The calling thread cannot access this object because a different thread owns it". In Visual Studio it's confirmed that it is that exact line failing.
I do not have any multi threading going on.
Any help would be appreciated. Using iX Developer 2.4 sp1 targeting a PC runtime. Tried multiple machines and they all throw the exception.
Script user login
Re: Script user login
If all you're doing is changing screens when a user logs in, I would use the SystemTagCurrentUser (Tags -> Add -> System Tag -> Current User)
Then use that tag's Value Change event to show the screen:
Code: Select all
void SystemTagCurrentUser_ValueChange(System.Object sender, Core.Api.DataSource.ValueChangedEventArgs e)
{
if(SystemTagCurrentUser.Value.String.Length > 0)
Main_Logged_In_Screen.Show();
if(SystemTagCurrentUser.Value.String == "")
Login_Screen.Show();
}
Best regards,
Russ
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us
Russ
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us