Guest Posted August 9, 2010 Share Posted August 9, 2010 Message from: "Oscar Flor" Hi Mr Farshad: I noticed that when a session is in a browser, the TUniForm change its ClassName to TUniExtForm. Is there a common ancestor from these two types of form that have the UniApplication property? I'm doing a lookup component and I want to get from the owner of the component the UniApplication property to create dinamically forms and components to make the lookup form. Best Regards -- . Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2010 Author Share Posted August 10, 2010 Message from: "Farshad Mohajeri" "Oscar Flor" wrote in message news:VXIR3%238NLHA.7696@anaxavps227.anaxa.local... > Hi Mr Farshad: > > I noticed that when a session is in a browser, the TUniForm change its > ClassName to TUniExtForm. > Well, to some level this is correct. > Is there a common ancestor from these two types of form that have the > UniApplication property? > Normally, you shouldn't need to use TUniExtForm directly . UniApplication is a property of TUniForm and it is available when you are inside a Form generated event. > I'm doing a lookup component and I want to get from the owner of the > component the UniApplication property to create dinamically forms and > components to make the lookup form. > TUniForm(MyComponent.Owner).UniApplication; or you can use global variable UniApplication from unit UniGUIApplication. Currently in VCL mode UniApplication returns nil. It will be fixed in next release. . Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2010 Author Share Posted August 10, 2010 Message from: "Farshad Mohajeri" "Farshad Mohajeri" > TUniForm(MyComponent.Owner).UniApplication; OOps! Above type cast is not correct. Please use below method. > or you can use global variable UniApplication from unit UniGUIApplication. > > Currently in VCL mode UniApplication returns nil. It will be fixed in next > release. > > > . Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2010 Author Share Posted August 10, 2010 Message from: "Oscar Flor" Farshad Mohajeri wrote: > > "Farshad Mohajeri" > > TUniForm(MyComponent.Owner).UniApplication; > > OOps! Above type cast is not correct. Please use below method. > > > or you can use global variable UniApplication from unit > > UniGUIApplication. > > > > Currently in VCL mode UniApplication returns nil. It will be fixed > > in next release. > > > > > > Mr Farshad: My problem is that I need to do this inside a package. There are problems to use UniGuiApplication unit inside a package, right? Best Regards -- . Quote Link to comment Share on other sites More sharing options...
Guest Posted August 10, 2010 Author Share Posted August 10, 2010 Message from: "Farshad Mohajeri" "Oscar Flor" wrote in message news:9iBQ3ZJOLHA.1604@anaxavps227.anaxa.local... > Farshad Mohajeri wrote: > >> >> "Farshad Mohajeri" >> > TUniForm(MyComponent.Owner).UniApplication; >> >> OOps! Above type cast is not correct. Please use below method. >> >> > or you can use global variable UniApplication from unit >> > UniGUIApplication. >> > >> > Currently in VCL mode UniApplication returns nil. It will be fixed >> > in next release. >> > >> > >> > > > Mr Farshad: > > My problem is that I need to do this inside a package. There are > problems to use UniGuiApplication unit inside a package, right? > You can include UniGuiApplication in a package Unit. . Quote Link to comment Share on other sites More sharing options...
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.