Your code doesn't look right to me (Although I use AMFPHP remoteObject
calls). At a guess...

<mx:method name="getOrder" 
  result="showOrder(event)"  
  fault="faultHandler(event)" />

public function showOrder(event:ResultEvent):void
{
    var OrderArrColl:ArrayCollection = new
ArrayCollection(ArrayUtil.toArray(event.result));
    var currentOrder:ORDERS =  ORDERS(OrderArrColl[0]);
    if(currentOrder.manuallyCreated)


--- In [email protected], "bobklhr" <[EMAIL PROTECTED]> wrote:
>
> I'm using calls to ColdFusion to populate master detail pages. This 
> works fine in Flex 2. In Flex 3, the remote call to populate the 
> master datagrid works fine using the returned query results, but the 
> call to get the details no longer works - I'm now getting an error 
> #1009 - Cannot access a property of a null object reference.
> 
> Here's the remote call:
> 
> <mx:method name="getOrder" 
>  result="showOrder(event.result as Object)"  
>  fault="myApp.faultHandler(event)" />
> 
> and part of the showOrderfunction:
> 
> public function showOrder(result:Object):void
> {
>       currentOrder =  result as ORDERS; <-- this doesn't work
>       if(currentOrder.manuallyCreated) <-- this causes the error
> 
> debugging shows that event.result is being returned from ColdFusion 
> and is being passed to showOrder() but for some reason the 
> assignment to currentOrder no longer works.
> 
> Any ideas as to what might have changed to caused this, or am I 
> doing something wrong?
> 
> Thanks
> 
> Bob
>


Reply via email to