in Services.mxml no I'm not.. just <?xml version="1.0" encoding="utf-8"?> <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:cairngorm="com.adobe.cairngorm.business.*"> <mx:RemoteObject id="MainService" destination="ColdFusion" showBusyCursor="true" source="myApp.remote.mainFacade"> </mx:RemoteObject> <mx:RemoteObject id="AdminService" destination="ColdFusion" showBusyCursor="true" source="myApp.remote.adminFacade"> </mx:RemoteObject> </cairngorm:ServiceLocator>
as far as I can tell it looks okay I'm even looking at another .mxml file in the same directory that is doing the exact same thing and it works there.. I just dont know what I'm doing wrong here.. the datagrid populates fine and I can even do Alert.show(event.target.selectedItem.headline); and bam.. headline alerts. but if I do currVO = event.target.selectedItem; and put a debug stopper afterwards this.currVO is null On Mon, Mar 16, 2009 at 10:48 AM, Tim Hoff <timh...@aol.com> wrote: > > What does your service tag code look like Greg? Are you for reason > setting makeObjectsBindable to false? > > -TH > > --- In flexcoders@yahoogroups.com, Greg Morphis <gmorp...@...> wrote: >> >> if it's event.target.selectedItem as headlineVO then currVO is always > null.. >> >> >> On Mon, Mar 16, 2009 at 10:41 AM, Greg Morphis gmorp...@... wrote: >> > I tried changing that to ResultEvent but seemed to conflict with the >> > IResponder import.. >> > Was getting an errors highlighting the below line >> > MyModel.getInstance().adminARCHeadlines >> > Implicit coercion of a value with static type object to possible >> > unrelated tye arrsy >> > and >> > interface method result in namespace mx.rpc.IResponder is > implemented >> > with an incompatible signature in class .... >> > >> > interface method result in namespace mx.rpc:Iresponder >> > >> > On Mon, Mar 16, 2009 at 10:27 AM, Tim Hoff timh...@... wrote: >> >> The result from your cfc call isn't being cast correctly; it's > nesting the >> >> result inside an object. >> >> >> >> public function result(event:Object) : void { >> >> MyModel.getInstance().adminARCHeadlines = new ArrayCollection >> >> (event.result); >> >> } >> >> >> >> Either loop through the result object and addItem; one at a time. > Or try >> >> changing the result format. >> >> >> >> -TH >> >> >> >> --- In flexcoders@yahoogroups.com, Greg Morphis gmorphis@ wrote: >> >>> >> >>> Still having a problem with this.. >> >>> I changed the assignment code to >> >>> currVO = headlineVO(event.target.selectedItem); >> >>> note: I also changed the name of the VO incase somewhere it was > being >> >>> set to null. >> >>> Anyways I started the debugger and when I selected a row in the > debugger I >> >>> see >> >>> Type Coercion failed: cannot convert obj...@9bef331 to >> >>> com.comp.MyApp.vo.headlineVO >> >>> >> >>> However when I explode [+]this and scroll down in the debugger >> >>> this.currVO shows that it's a com.comp.MyApp.vo.headlineVO... >> >>> WTH am I missing? >> >>> >> >>> On Fri, Mar 13, 2009 at 5:27 PM, ppongtong ppongtong@ wrote: >> >>> > Please try >> >>> > public function result(event:Object) :void >> >>> > { >> >>> > var dummy :headlineVO; // add this line >> >>> > >> >>> > MyModel.getInstance().adminARCHeadlines = new >> >>> > ArrayCollection(event.result); >> >>> > } >> >>> > >> >>> > >> >>> > --- In flexcoders@yahoogroups.com, Greg Morphis gmorphis@ wrote: >> >>> >> >> >>> >> In the command result I have >> >>> >> public function result(event:Object) : void { >> >>> >> MyModel.getInstance().adminARCHeadlines = new ArrayCollection >> >>> >> (event.result); >> >>> >> } >> >>> >> >> >>> >> adminARCHeadlines is an ArrayCollection in MyModel.as >> >>> >> >> >>> >> How do I tell it that it's an ArrayCollection of VOs? >> >>> >> >> >>> >> On Fri, Mar 13, 2009 at 3:21 PM, ppongtong ppongtong@ wrote: >> >>> >> > Actually, when u get the data from cfc, did u map it to your >> >>> >> > headlineVO? >> >>> >> > >> >>> >> > >> >>> >> > --- In flexcoders@yahoogroups.com, Greg Morphis <gmorphis@> > wrote: >> >>> >> >> >> >>> >> >> I have a vo headlineVO that has the following variables >> >>> >> >> headline_id:Number >> >>> >> >> headline:String >> >>> >> >> effdate:Date >> >>> >> >> endeffdate:Date >> >>> >> >> actionuser:String >> >>> >> >> actiondate:Date >> >>> >> >> I have a cfc that returns an ArrayCollection of beans, each > bean has >> >>> >> >> the above variables too. >> >>> >> >> I can populate a datagrid with this data and it shows fine. >> >>> >> >> I'm trying to populate a new vo (currentVO) when the user > selects a >> >>> >> >> row and hits "edit". >> >>> >> >> The new VO shows as being null in the debugger. >> >>> >> >> This is what my code looks like >> >>> >> >> >> >>> >> >> <mx:DataGrid id="headlinesDG" >> >>> >> >> dataProvider="{MyModel.getInstance().adminARCHeadlines}" >> >>> >> >> click="selectedHeadline" ... >> >>> >> >> ... >> >>> >> >> </mx:DataGrid> >> >>> >> >> >> >>> >> >> above I have a function >> >>> >> >> private function selectedHeadline():void { >> >>> >> >> currentVO = headlinesDG.selectedItem as headlineVO; >> >>> >> >> } >> >>> >> >> >> >>> >> >> and for the editButton.click I have another function that > just Alert >> >>> >> >> the currentVO.headline; >> >>> >> >> >> >>> >> >> I get a null object reference when I click on the edit > Button. >> >>> >> >> If I put a breakpoint above the Alert I can see that > currentVO is >> >>> >> >> null, how can I assign that selected row to my vo? >> >>> >> >> Can anyone offer suggestions or things I should check? >> >>> >> >> >> >>> >> >> Thanks in advance! >> >>> >> >> >> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> > ------------------------------------ >> >>> >> > >> >>> >> > -- >> >>> >> > Flexcoders Mailing List >> >>> >> > FAQ: > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >> >>> >> > Alternative FAQ location: >> >>> >> > > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-\ > 1e62079f6847 >> >>> >> > Search Archives: >> >>> >> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links >> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> >> >>> > >> >>> > >> >>> > >> >>> > >> >>> > ------------------------------------ >> >>> > >> >>> > -- >> >>> > Flexcoders Mailing List >> >>> > FAQ: > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >> >>> > Alternative FAQ location: >> >>> > > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-\ > 1e62079f6847 >> >>> > Search Archives: >> >>> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! > Groups Links >> >>> > >> >>> > >> >>> > >> >>> > >> >>> >> >> >> >> >> >> >> > >> > > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links > > > >