I am looking at code developed using Flex 3, I am using Flex 4.6. I know that application was depreciated and I need to use FlexGlobals instead, however I am having problems firuging out the errors
So in Flex 3 this was an original code snippet
serverURL = com.test.commons.application.Application.application.url;
I've messed around with FlexGlobals in a numer of ways
serverURL = com.test.commons.application.Main(FlexGlobals.topLevelApplication).application.url;
serverURL = com.test.commons.application.FlexGlobals.topLevelApplication.application.url;
serverURL = com.test.commons.application.Appication.FlexGlobals.topLevelApplication.url;
Can anyone tell me where I am going wrong?
Have you tried
serverURL = FlexGlobals.topLevelApplication.serverURL
assuming that serverURL is a public variable in your main app?
In our code we replaced 'mx.core.Application.application.url' with 'FlexGlobals.topLevelApplication.url'
how that would work with com.test.commons.xxx I'm not sure.
Thanks for the feedback, there was an error in the declarion of com.test.commons before the Application, was old code that is now update. Thanks again