skafy Posted March 16, 2016 Posted March 16, 2016 Hi, I'm having a problem accessing UniMainForm from my application. I have 1 Main(MainForm) which is having 1 (Application) datamodule and that module is having another 1 (Application) datamodule. Form |_ DataModule 1 |_DataModule 2 If I understand UniMainForm correctly it is created for each session and its basicly datamodule(Shared unit) for whole application. Now... I'm creating threads in datamodule 2 and trying to write data to UniMainForm, but what I get is UniMainModule.CreatedTaskIns:= ATaskIns.Key; I Get access violation 0000064. I tried to read that variable from Datamodule1 and works good. It seems like i cant retrive current session from thread. Quote
Administrators Farshad Mohajeri Posted March 16, 2016 Administrators Posted March 16, 2016 Now... I'm creating threads in datamodule 2 and trying to write data to UniMainForm, but what I get is :excl: Quote
Administrators Farshad Mohajeri Posted March 16, 2016 Administrators Posted March 16, 2016 You can only access a uniGUI visual object from event handlers generated on client side. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.