Search code examples
actionscript-3apache-flexflex3mxml

How to share object between two Popup mxml files in Flex?


In my Flex Application have CreateEvent.mxml and AddEvent.mxml file is their.

In CreateEvent.mxml:

[Bindable]public var timetabelVO:TimetableVO = new TimetableVO();//This is external object (java)
-----------

Now i want to use timetableVO object in AddEvent.mxml file, so i'm doing like this..

public var create:CreateEvent = new CreateEvent();
var timetable:TimetableVO = create.timetableVO;

But hear timetable variable have NULL value


Solution

  • Definitely it should return null because as your code is saying that you are creating a new object "public var create:CreateEvent = new CreateEvent();" and than trying to initialize a property (var timetable:TimetableVO ) with null instance of a class.

    You can find more details at following link - how to send Java object into between two mxml files in java?