zenLogic
asked on
Error #1009: Cannot access a property or method of a null object reference. (Flex Builder 2)
basically all I did was take the dashboard demo that comes with Flex, created a login panel and put them both in a ViewStack to give a secure access to the dashboard. I changed the results.xml a bit to display data more pertinent to the customer and that's pretty much it. passing the resultHandler into the VBox containing the dashboard panels has solved the greater issue of no data to plot the graphs with but the error below still persists when the app is run. (well, for some reason it's fine here on Netscape & Firefox but not on IE6. however, when my assoc tried it under Firefox it came up for him too. :P )
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at dashboard/::resultHandler( )
at dashboard/__srv_result()
at flash.events::EventDispatc her/flash. events:Eve ntDispatch er::dispat chEventFun ction()
at flash.events::EventDispatc her/dispat chEvent()
at mx.rpc.http.mxml::HTTPServ ice/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/ackno wledge()
at ::DirectHTTPMessageRespond er/complet eHandler()
at flash.events::EventDispatc her/flash. events:Eve ntDispatch er::dispat chEventFun ction()
at flash.events::EventDispatc her/dispat chEvent()
at flash.net::URLLoader/flash .net:URLLo ader::onCo mplete()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at dashboard/::resultHandler(
at dashboard/__srv_result()
at flash.events::EventDispatc
at flash.events::EventDispatc
at mx.rpc.http.mxml::HTTPServ
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/ackno
at ::DirectHTTPMessageRespond
at flash.events::EventDispatc
at flash.events::EventDispatc
at flash.net::URLLoader/flash
Chances are the reason it is fine in Netscape/Firefox is probably because you don't have the Firefox Flash 9 Debug Player installed, so the error just does not come up.
To find the exact line causing the error there are a few things you can do.
1. You can run the app using debug mode from Flex, when the error occurs it will stop on the line causing the error.
2. (Quick and Dirty) Put an alert every few lines, when the app runs you will see the last Alert message and can then assume that the error is between that alert and the next alert that did not show up.
Once you figure out the line of the error, post the code and tell us the line, we will probably be able to help more with that information.
To find the exact line causing the error there are a few things you can do.
1. You can run the app using debug mode from Flex, when the error occurs it will stop on the line causing the error.
2. (Quick and Dirty) Put an alert every few lines, when the app runs you will see the last Alert message and can then assume that the error is between that alert and the next alert that did not show up.
Once you figure out the line of the error, post the code and tell us the line, we will probably be able to help more with that information.
ASKER
you mean there is a special debug player for each browser type? wild.
>>> when I run debug it always stops on this line and I've tried to conditionally execute it but it didn't help. lemme know if you need more!
regionBreakdown.month = monthData[0];
>>> when I run debug it always stops on this line and I've tried to conditionally execute it but it didn't help. lemme know if you need more!
regionBreakdown.month = monthData[0];
ASKER
oh yeah, on Netscape I had to explicitly go back to the first release of Flash 9 so it would stop crashing. guess my assoc must have the latest Flash on his FF install, eh?
ASKER CERTIFIED SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER
yup, it's the chart component referenced within the app.
what does this do? it's like the first thing inside the regionBreakdown.mxml script...
<mx:Metadata>
[Event("regionChange")]
</mx:Metadata>
what does this do? it's like the first thing inside the regionBreakdown.mxml script...
<mx:Metadata>
[Event("regionChange")]
</mx:Metadata>
ASKER
is there a way to just turn the debug function off?
The mx:Metadate tag just specifies that the component fires the regionChange event
ASKER
well, the conditioning of that set stmt worked. HAZZAH!! *whew*
trying to recoup from crunching all weekend but will try out the master-detail datagrid suggestion soon.
I hope that works. most of the postings I found on the web involved some crazy event driven array collection and massage.
could you recommend any books or webinars that helped you figure out Flex??
trying to recoup from crunching all weekend but will try out the master-detail datagrid suggestion soon.
I hope that works. most of the postings I found on the web involved some crazy event driven array collection and massage.
could you recommend any books or webinars that helped you figure out Flex??
ASKER
there is no category for Flex on EE. what should I put in the subject line that will make it so y'all can find my questions??
ASKER
kinda crazy. the error was gone when I ran the app local but when I uploaded it they thing phukt up again. :P
I been just uploading the SWF to a dev site - do I need to include anything else?
I been just uploading the SWF to a dev site - do I need to include anything else?
Maybe check all the subdirectories of the /bin dir. Maybe Flex is compiling another swf that your application is referencing.
ASKER
sorry, I uploaded it to the wrong folder. have you used the Publish feature on Flex? does it use an FTP link?
I have not used the publish feature of flex. I actually use SFTPDrive and set flex to build to my remote location.
As for books, there are not many out yet, pretty much the best resource is the Actionscript docs on adobe : http://livedocs.macromedia.com/flex/2/langref/
If you want me to find your questions just ensure the phrase "Flex 2" appears somewhere in the subject or the body of the question and my filter will pick it up.
- Matt
As for books, there are not many out yet, pretty much the best resource is the Actionscript docs on adobe : http://livedocs.macromedia.com/flex/2/langref/
If you want me to find your questions just ensure the phrase "Flex 2" appears somewhere in the subject or the body of the question and my filter will pick it up.
- Matt
ASKER
ASKER
have you used XML to populate a master-detail datagrid applet?

http://life.neophi.com/danielr/2006/07/flex_2_runtime_error_1009_and.html (and yes, this is a quick Google result, but it appears to attack your question directly).