Guest Posted December 17, 2010 Share Posted December 17, 2010 Message from: "Junior/RO" Hi Farshad. I have found a sample code where UniMainModule() is declared as: function UniMainModule: TUniMainModule; begin if UniApplication <> nil then Result := TUniMainModule(UniApplication.UniMainModule) else Result := TUniMainModule(VCLMainModule); end; Is this necessary? Can you please tell me the effects of using this? -- Que é essa vida se, com tanto a fazer, não temos tempo para parar e ver? . Quote Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2010 Author Share Posted December 17, 2010 Message from: "Farshad Mohajeri" "Junior/RO" wrote in message news:ktjZFicnLHA.232@anaxagvs227... > Hi Farshad. I have found a sample code where UniMainModule() is declared > as: > > function UniMainModule: TUniMainModule; > begin > if UniApplication <> nil then > Result := TUniMainModule(UniApplication.UniMainModule) > else > Result := TUniMainModule(VCLMainModule); > end; > Hi Junior, Where did you find this code? It must be from an old Sample code. New format is : function UniMainModule: TUniMainModule; begin Result := TUniMainModule(UniApplication.UniMainModule) end; It is necessary when you want to access UniMainModule from other units. . Quote Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2010 Author Share Posted December 17, 2010 Message from: "Junior/RO" Farshad Mohajeri escreveu: > Where did you find this code? It must be from an old Sample code. See the thread "Sampes user AREA" from 11 of october of 2010. There are a code there. -- Que é essa vida se, com tanto a fazer, não temos tempo para parar e ver? . Quote Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2010 Author Share Posted December 17, 2010 Message from: "Junior/RO" Farshad Mohajeri escreveu: > Where did you find this code? It must be from an old Sample code. The MegaDemo's MainModule.pas use this code too. -- Que é essa vida se, com tanto a fazer, não temos tempo para parar e ver? . Quote Link to comment Share on other sites More sharing options...
Guest Posted December 21, 2010 Author Share Posted December 21, 2010 Message from: "Farshad Mohajeri" "Junior/RO" wrote in message news:ro0sVShnLHA.2316@anaxagvs227... > Farshad Mohajeri escreveu: > >> Where did you find this code? It must be from an old Sample code. > > The MegaDemo's MainModule.pas use this code too. Yes, that demo is an early demo. . 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.