Hello,

I am using the flex ajax bridge. Up until now it's been easy to work
with, but I have finally encountered a problem.  

I am trying to find out if I can pass my own custom objects. I am
trying to pass data from one flex application to another. I CANNOT use
a server, so I am using the bridge. This has worked when I pass
strings or even complex arrays, but when I try to pass a class I have
defined in an .AS file, I get an error, specifically:

Error: Error calling method on NPObject!
Source File: http://172.31.67.224/FABridge.js
Line: 236

So I would like to know:

1) Are we even allowed to do this via the bridge?
2) If we are allowed,  do I need to import the class somehow into the
javascript?

Here is what the code looks like in the javascript:

function loader() {

window.resizeTo(700, 700);


var initCallback = function()
     {
        
        var flexWin = window.opener;
        var statBridge = flexWin.makeBridge();
                        
        var testRep = statBridge.getReportData();  
        alert("in call back:" + testRep);

        var flexApp = FABridge.flash.root();
        alert("about to pass in metadata");

        flexApp.fetchData(testRep);
                        
                
       alert("done with fetch data");
         
         
         
     }
     FABridge.addInitializationCallback("flash",initCallback);
     
     

}

If the methods getReportData() and fetchData() take strings or arrays
as arguments I am fine, but when I try and use my own custom class I
get the error.

Thank you,

Chris Warden







Reply via email to