Hi Bart, Sorry for the delay in my reply. Unfortunately that "undefined" error is a player bug which is effectively hiding from us the real source of the error. The line number in the stack trace is a finally clause... the player is misreporting the source of the actual error.
The CommitResponder class is going to be calling your responder functions so if one of them gets a runtime time error, it would end up showing that stack trace. In the past, to find particularly nasty errors like this I've had to rewrite the code to eliminate the finally clause so we can find the actual error. If you use the <mx:TraceTarget/> we print messages before and after calling the user result handlers so that might help track down where the error is occurring. I'd probably stop in the userCreated function and step through it in the debugger first just to be sure it completes successfully. Jeff From: [email protected] [mailto:[email protected]] On Behalf Of Besite - Bart Sent: Tuesday, January 27, 2009 5:03 AM To: [email protected] Subject: Re: [flexcoders] LCDS : Managed associations - creating new Items Hi Jeff, I was now trying to use the createItem method (because adding an Item to a managed collection resulted in the "Null identity map for destination" error), altough I do not need to have a client reference for this specific item... But when I run the following code : var token1:AsyncToken = ds.createItem(user1); token1.addResponder(new ItemResponder(userCreated, userFault)); token1.chatRoom = room; var token2:AsyncToken = ds.createItem(user2); token2.addResponder(new ItemResponder(userCreated, userFault)); token2.chatRoom = room; ds.commit(); I get the following error (which actually has no clear error message, just an error stack trace ... undefined at mx.data::CommitResponder/result()[C:\depot\DataServices\branches\lcds26_hotfixes\frameworks\projects\data\src\mx\data\CommitResponder.as:432] at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] at NetConnectionMessageResponder/resultHandler()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:491] at mx.messaging::MessageResponder/result()[E:\dev\3.1.0\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199] I will send you also my server log for the other error "Null identity map for destination" ... Kind regards, Bart Ronsyn Just adding an item to a managed collection will implicitly queue up a "create" for the child item. If you call "createItem" it also adds a new client reference just for that specific item. So usually you want to avoid calling createItem unless that item lives all by itself. Jeff From: [email protected] [mailto:[email protected]] On Behalf Of Besite - Bart Sent: Monday, January 26, 2009 3:16 AM To: [email protected] Subject: [flexcoders] LCDS : Managed associations - creating new Items Hello, Another Livecycle question.. I have a managed collection of Companies. Eeach company contains a list of employees. The Company-object and Employee-object are Managed objects, tagged with the [Managed] metadata tag. They each have an associated destination on the server (configured in the data-management-config.xml). There exists a one-to-many managed association between these two objects. When I add a new Employee to the managed arraycollection "companies" like this : Employee newEmployee = new Employee("John Smith", "Engineer"); companies.addItem(newEployee); companyDS.commit(); Should this result in a createItem() in the EmployeeAssembler ? Or should I explicitly call employeeDS.createItem(newEployee); ? Thanks for your help.. Bart
<<inline: image001.jpg>>
<<inline: image002.jpg>>

