topleft topright

Welcome, Guest. Please login or register.
July 24, 2016, 07:18:47 PM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit to request forum access.

Pages: [1]
Author Topic: Where'd my argument go?  (Read 1733 times)
Courseware Beta
Sr. Member
Posts: 55

View Profile Email
« on: February 24, 2008, 06:26:37 AM »

Very likely, this issue isn't caused by the framework itself but it strikes me as quite strange and Flexcoders hasn't pickup on it.

I've refactored the sample Book App that David Deraedt has posted at: My version sits at

The problem is the detail view is never passed a populated current slide - something that should happen at the 'change' event of the datagrid:

               change="selectSlide( as Slide)"
               dataProvider="{slides}" >

Placing a breakpoint on the change property and observing the value shows the event is carrying the
expected info. But when execution reaches the handler:

       public var selectedSlide:Slide;
       private function selectSlide(pSlide:Slide):void
               selectedSlide = pSlide ;  // pSlide is now null.
               dispatchEvent(new Event(SELECT, true));

the param is null. If I remove the explicit cast to 'Slide' when calling the handler and change the signature to 'Object' ... again null.

Changing as Slide to   & the handler's signature to accept a Number _will pass the expected value.

Why no compile _or runtime error? I find that if I intentionally misspell the dataField property of one of the DG's columns, that column comes up blank but others render as expected and, again, no error reported.

Is it possible the framework is somehow masking something that prevents an error condition from bubbling high enough?

What could cause the value of 'selectedItem' to show as valid at the point that the event Handler is called but 'null' when that function is hit?


Pages: [1]
Jump to:  

Login with username, password and session length

Powered by SMF 1.1.11 | SMF © 2006-2007, Simple Machines LLC
Copyright © 2006-2008 Futurescale, Inc.