Is the dataProvider valid at that point?  Can you access it directly via id?  Is there maybe a timing isue?

 

By the way, I don’t really understand “I am trying to do this with out having to use an array collection.”

 

You can’t do anything with data without a dataProvider.  What is the issue?  What is your dataProvider?  How are you populating it?

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jeremy Rottman
Sent: Friday, July 07, 2006 3:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Adding an item to a dg

 

I tried your example tracy and it still gives me an error.

This is the new error it gives me. Any ideas?
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
components.views.transactions.widgets::actionNewListAgentPanel/::PartyManager_Listing_Add_Agent_Result()
at
components.views.transactions.widgets::actionNewListAgentPanel/___Operation4_result()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::DirectHTTPMessageResponder/completeHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()

--- In [EMAIL PROTECTED]ups.com, "Jeremy Rottman" <rottmanList@...>
wrote:
>
> Doh I tried everything but that. Thanks tracy
>
>
> --- In [EMAIL PROTECTED]ups.com, "Tracy Spratt" <tspratt@> wrote:
> >
> > That syntax has always been a shortcut for
> > ...partyDG.dataProvider.addItem, and the shortcut syntax has been
> > removed from 2.0.
> >
> >
> >
> > So go through the dataProvider property like above.
> >
> >
> >
> > Tracy
> >
> >
> >
> > ________________________________
> >
> > From: [EMAIL PROTECTED]ups.com
[mailto:[EMAIL PROTECTED]ups.com] On
> > Behalf Of Jeremy Rottman
> > Sent: Friday, July 07, 2006 11:56 AM
> > To: [EMAIL PROTECTED]ups.com
> > Subject: [flexcoders] Adding an item to a dg
> >
> >
> >
> > I am working with my party manager, I finally got it laid out
correctly.
> > However, I have ran into one last problem, when a user finds the party
> > they want to tag to the file, I am trying to populate the party
display
> > DG with the party they just added. However, I think I am going about
> > this the wrong way. I am trying to do this with out having to use an
> > array collection. I want to add directly to the dg.
> >
> > This is the code that I am trying.
> >
> > // CALL LISTING ADD AGENT METHOD
> > private function
> > PartyManager_Listing_Add_Agent(fileNum,uuid,name){
> > PartyManager.Listing_Add_Agent(fileNum, uuid,name)
> > }
> >
> > // HANDLE LISTING ADD AGENT METHOD
> > private function
> > PartyManager_Listing_Add_Agent_Result(result):void{
> > Alert.show(result);
> >
> >
parentApplication.mainDisplay.ntcl.partyDG.addItem({partyName:agentSearc
> > \
> > hDG.selectedItem.FLD_AGENTFULLNAME})
> > }
> >
> > // HANDLE LISTING ADD AGENT ERRORS
> > private function
> > PartyManager_Listing_Add_Agent_Fault(event:FaultEvent):void{
> > Alert.show("Test Error","Program Error")
> > }
> >
> > This is the error that I am getting.
> >
> > ReferenceError: Error #1069: Property addItem not found on
> > mx.controls.DataGrid and there is no default value.
> > at
> >
components.views.transactions.widgets::actionNewListAgentPanel/::PartyMa
> > \
> > nager_Listing_Add_Agent_Result()
> > at
> >
components.views.transactions.widgets::actionNewListAgentPanel/___Operat
> > \
> > ion4_result()
> > at
> >
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven
> > \
> > tFunction()
> > at flash.events::EventDispatcher/dispatchEvent()
> > at
> >
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::di
> > \
> > spatchRpcEvent
> > <http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent> ()
> > at
> >
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resu
> > \
> > ltHandler
<http://www.adobe.com/2006/flex/mx/internal::resultHandler> ()
> > at mx.rpc::Responder/result()
> > at mx.rpc::AsyncRequest/acknowledge()
> > at ::DirectHTTPMessageResponder/completeHandler()
> > at
> >
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven
> > \
> > tFunction()
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





YAHOO! GROUPS LINKS




__,_._,___

Reply via email to