|
|
Home /
Groups /
Adobe Flex
Flex 2 to Flex 3 migration problem
I'm using calls to ColdFusion (MX 7.02)to populate master/detail pages. Thisbob keleher 04/23/08 08:44 A What happens if you just goTariq Ahmed 04/23/08 02:22 P result="showOrder(event.result as Object)"Craig Taylor 04/30/08 03:28 P 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 What happens if you just go currentOrder = result; bob keleher wrote: ----- Excess quoted text cut - see Original Post for more ----- 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
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||