Paul,

Thanks for your answer.  You are losing me though at.

ro.getProjectData....

I understand the ...addEventListener("result",getProjectDataResult);

Here is my progress so far, based on your input, in moving my mxml RemoteObject:

<!--  <mx:RemoteObject id="conn" destination="ColdFusion"
                 source="cfching.components.comboBox"
                result="cbx.dataProvider = event.result;">
        </mx:RemoteObject>-->

into actionscript:

public var connObject:RemoteObject;
         
     public function createRemoteObject():void{
             connObject = new RemoteObject();
             connObject.destination = "ColdFusion";
             connObject.source = "cfching.components.comboBox";
             connObject.addEventListener(ResultEvent.RESULT,getQueryResult); 

I don't understand this line of yours either:

ro.getProjectData(this.view.project);

I'm thinking I can just put a result into my ComboBox's dataprovider in my 
getQueryResult() -- which I have not written yet -- function. So I'm not sure 
what the ro.getProjectData(this.view.project); would do.

thanks for your time!
brad

--- In flexcoders@yahoogroups.com, Paul Kukiel <pkuk...@...> wrote:
>
> A quick example that should get you going:
> 
> import mx.rpc.remoting.RemoteObject;
> 
> var ro:RemoteObject = new RemoteObject;
>                       ro.destination = "ColdFusion";
>                       ro.source = "com.company.ProjectData";
>                       
> ro.getProjectData.addEventListener("result",getProjectDataResult);
>                       ro.getProjectData(this.view.project);
> 
> 
> Paul.
> 
> On Thu, Apr 2, 2009 at 7:06 PM, brad.bueche <b...@...> wrote:
> > I cant find a good example of how to create a remoteObject in ActionScript.
> > All the examples seem to be way more complicated than I need and I cant
> > follow what they are doing. On top of that, they don't cover the parameters
> > that I need. I've also looked through 5 books. ActionScript books dont cover
> > it and flex books do it via mxml! All I need to do is recreate the
> > mxml:RemoteObject in Actionscript. This is a very simple connection via CF.
> >
> > ********************************************************
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
> >
> > <mx:Script>
> > <![CDATA[
> > import mx.events.FlexEvent;
> > import mx.controls.ComboBox;
> >
> > public var cbx:ComboBox = new ComboBox();
> >
> > private function addPanelChild():void {
> > var buttonName:String;
> > cbx.x = 60;
> > cbx.addEventListener(FlexEvent.CREATION_COMPLETE,handleCreationComplete);
> > cbx.labelField = "Label";
> > addChild(cbx);
> > }
> >
> > private function handleCreationComplete(e:FlexEvent):void{
> > conn.getData();
> > }
> > ]]>
> > </mx:Script>
> >
> > <mx:RemoteObject id="conn" destination="ColdFusion"
> > source="cfching.components.comboBox"
> > result="cbx.dataProvider = event.result;">
> > </mx:RemoteObject>
> >
> > <mx:Button id="btn1" label="test" click="addPanelChild();" />
> >
> > </mx:Application>
> >
> >
>


Reply via email to