House of Fusion
Home of the ColdFusion Community
Hostmysite Dedicated Hosting

Search flex

July 19, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  Adobe Flex 2

Flex 2 to Flex 3 migration problem

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
bob keleher
04/23/2008 08:44 AM

I'm using calls to ColdFusion (MX 7.02)to populate master/detail pages. This works fine in Flex 2. In Flex 3, the remote call to populate the master datagrid works as expected using the returned query results, but the call to get the details (an object) 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 assignment 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() as result 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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tariq Ahmed
04/23/2008 02:22 PM

What happens if you just go currentOrder = result; bob keleher wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Craig Taylor
04/30/2008 03:28 PM

result="showOrder(event.result as Object)" fault="myApp.faultHandler(event)" /> Change to: public function showOrder(result:Object):void{ Change to (assuming you have ORDERS defined as some type of collection, Object etc in you property declarations): public function showOrder(e:ResultEvent):void{ currentOrder:ORDERS = e.result as ORDERS; <-- this assignment doesn't work if(currentOrder.manuallyCreated) <-- this causes the error


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists