Reputation: 154664
If the planets are not correctly aligned when I run a Flex 3.5 build, the .swf
produced immidiatly throws a null-object error from the _MyAppWatercherSetupUtil
:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at _MyAppWatcherSetupUtil/setup() at MyApp/initialize()[/Users/wolever/my_app/MyApp.mxml:0] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2131] at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3400] at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3223] at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3069]
Is there anything I can do about this?
I've tried debugging it, but it seems like the Flex framework goes out of its way to make sure it's impossible to debug into the generated code…
Upvotes: 0
Views: 2525
Reputation: 149
I just upgraded an old Flex 3 app to Flex 4.6 and had the same problem. What worked for me was a project clean. So far so good.
--Keith
Upvotes: 2
Reputation: 555
I was struggeling today with a WatcherSetupUil/setup() TypeError: Error #1009: Cannot access a property or method of a null object reference.
For me it looks there is a strong connection to databinding. For me it looks this happens if you do not take care of the rules that Flex asks for. I found a resource online I upload here: "Flex data binding pitfalls: 10 common misuses and mistakes." After changing - in my case especially error 6 - Using the wrong bindable event name - took the WatcherSetupUtil away.
Perhaps this is helpful for you too :-). http://www.adobe.com/devnet/flex/articles/databinding_pitfalls.html
Upvotes: 1
Reputation: 555
Just an idea - did you try to set the compiler flag -keep? Like this you may have a look how your class looks like.
Upvotes: 0
Reputation: 881
It would be interesting to have a glimpse at generated code for "setup" method for your MyAppWatcherSetupUtil class
Upvotes: 0