Apache Flex 4.12 / AIR 4.0 / GDS 3.0.3GA / Tide application not initialising

38 views
Skip to first unread message

Jasen Martin

unread,
May 11, 2014, 12:32:22 PM5/11/14
to gran...@googlegroups.com
Hi

I am just starting out using graniteds 3.0.3.GA and having issues setting up gds-tide-example (as an AIR app / Tomcat 7 Spring 2)

I am using the latest granite-client-flex45 advanced projects to compile the swc's.

My question is, why am I receiving an error when initialising the Tide Application.

After looking at the issue, I found app flexGlobals.topLevelApplication is returning null in org.granite.tide.Tide class.


var flexGlobals:Class = getDefinitionByName("mx.core.FlexGlobals") as Class;
        app = flexGlobals.topLevelApplication;


I know this is strictly speaking a flex sdk/air issue, but have not found anything helpful elsewhere yet, so I thought I would ask you guys.

Any help much appreciated
Jasen


Jasen Martin

unread,
May 12, 2014, 2:27:19 AM5/12/14
to gran...@googlegroups.com
Just an update, I have continued trying to get the gds-tide-client project to work (using granite-master 3.0.3GA libraries) and Apache Flex 12.1/AIR 13 release.
and found the issue seems to be with:

[Bindable]
  private var tideContext:Context = Spring.getInstance().getSpringContext();

For some reason the tideContext is failing.

I will continue checking my setup.

Gavin Donald

unread,
May 12, 2014, 8:03:00 AM5/12/14
to gran...@googlegroups.com
In my application I have a preinitialize handler:

<s:Application ... preinitialize="onPreinitialize()" >

public static function preinitialize():void {
    Spring.getInstance().initApplication();
}


Hope this helps.

Jasen Martin

unread,
May 13, 2014, 12:05:05 AM5/13/14
to gran...@googlegroups.com
Thanks Gavin

Yes, I have this in main.mxml:

                                      <s:WindowedApplication ..
preinitialize="ApplicationController.preinitialize()" 
creationComplete="init()"

And I found I could not init the tideContext like this:

[Bindable]
  private var tideContext:Context;// = Spring.getInstance().getSpringContext(); //returned null

Needed to init tideContext in init() instead from the CreationComplete()

                        public function init():void { 
                                        ApplicationController.init(); 
                                        tideContext = Spring.getInstance().getSpringContext(); //works now
                       }


Knew it had to be something simple.

On Monday, May 12, 2014 2:32:22 AM UTC+10, Jasen Martin wrote:
Reply all
Reply to author
Forward
0 new messages