Hi List,
I have a problem with loading the arrays I'm getting back from a database
(web service). I trace the arrays and they show up perfect in the output
window, but when I try to assign them to a text area component to display in
there, nothing shows up inside the Text Component.

I don't have really much experience with this kind of flash work, so any
help or guidelines would be really helpful.

I did not post the actual URL, because the url is behind a firewall, so no
one will access it from outside. And also I pass a fixed params, I left that
blank for the same reason.

Thanks
Andy

// I have the component inside my lib so it's not that kind of a problem.//

//AS Code//
import mx.data.components.WebServiceConnector;
import mx.controls.TextArea;
import mx.data.binding.*;

var commTA:TextArea = createClassObject(TextArea, "text_txt",
this.getNextHighestDepth());
commTA.setSize(290, 100);
commTA.move(1, 1);
commTA.wordWrap = true;

var wsComment:WebServiceConnector = new WebServiceConnector();
var WSListener:Object = new Object();
WSListener.send = function(evtObj:Object):Void {
    //trace ("sending data");
}
WSListener.result = function(evtObj:Object):Void {
    var bindingResults:Array = evtObj.target.results;
    
    trace("Starting to display comment data");
    for(var i = 0; i < bindingResults.articles.length; i++) {
        
        trace("");
        // Article info
        trace("Article Info");
        trace(bindingResults.articles[i].articleTitle);
        trace(bindingResults.articles[i].articleDate);
        trace(bindingResults.articles[i].countComments);


        
        // Poster Info
        trace("Poster Info");
        trace(bindingResults.articles[i].posterInfo.userId);
        trace(bindingResults.articles[i].posterInfo.firstName);
        trace(bindingResults.articles[i].posterInfo.lastName);
        
        // Fourm URL to the comment post
        trace("Forum URL");
        trace(bindingResults.articles[i].forumUrl);
        
    }

    
};
wsComment.addEventListener("send", WSListener);
wsComment.addEventListener("result", WSListener);

wsComment.WSDLURL = "THE URL HERE";
wsComment.operation = "getActivityComments";
wsComment.multipleSimultaneousAllowed = false;
wsComment.suppressInvalidCalls = true;
wsComment.params = ["a fixed params here"];

wsComment.trigger();


var fromBinding:EndPoint = new EndPoint();
var toBinding:EndPoint = new EndPoint();
fromBinding.component = wsComment;
fromBinding.property = "results";
toBinding.component = commTA;
toBinding.property = "text";
var newBinding:Binding = new Binding(fromBinding, toBinding);




_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to