MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

FLEX 2 Container conflict

Last post 04-20-2008 2:09 PM by Alien Psychic Cyborg Ex-Ninja Reiki Master. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-20-2008 12:36 PM

    FLEX 2 Container conflict

    I'm using Joseph's Actionscript 3 library and am making a simple request:

    MySpaceContainer.instance.init(Application.application.parameters.opensocial_token, Application.application.parameters.opensocial_surface);
    var dr:MSDataRequest = opensocial.newDataRequest() as MyOpenSpace.MSDataRequest;
    dr.add(dr.newFetchPersonRequest(DataRequest.PersonId.VIEWER), "viewer");

    The app compiles just fine but when I upload it to put on the canvas page, the opensocial_token/surface is valid but I get a null pointer exception in the opensocial.newDataRequest().  From looking at the error, it looks like Flash is getting confused between the Flex Container class and the opensocial.Container class.  Has anyone else run into this when making a Flex/AS3 app?  How do I get around this?

    I'm thinking somewhere in the library it needs to be more specific on that it's using opensocial.Container. 

    The exact error I'm getting is:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at App()[F:\Dev\flash\Game\App.as:148]
    at mx.core::Container/createComponentFromDescriptor()[C:\dev\flex_201_gmc\sdk\frameworks\mx\core\Container.as:3619]
    Somehow it's trying to use mx.Container instead of opensocial.Container
    Filed under: ,
  • 04-20-2008 2:09 PM In reply to

    Re: FLEX 2 Container conflict

     Figured it out.... not sure if this is a FlashDevelop specific problem but DataRequest.PersonId.VIEWER doesn't resolve correctly.  I also tried opensocial.DataRequest.PersonId.VIEWER and that didn't work but substituting "VIEWER" (which is what it SHOULD resolve to) works fine.....  Strange.

Page 1 of 1 (2 items)