11 Replies Latest reply on Nov 23, 2009 3:09 PM by InvrtdSpear

    perty or method of a null object reference."Ok, done going crazy. 50 bucks to a paypal account, if someone explains why & solution - "Cannot access a pro

    rickcr Level 1

      I suppose it's cheezy to offer money for some help (and I suppose this somewhat related to a post being discussed yesterday), but I'm so tired of looking at this - been trying things ALL day and its worth at a minimum 50 bucks if someone takes some time to help with an explanation of what's going on and how to fix it  (hopefully it's just some newbie issue that I'll be cursing myself for missing.)

       

      I have things stripped down to a narrow version of the application to demonstrate the problem. You can download it (link at bottom of page) and just run the html/swf in bin-debug and you'll see the problem (or maybe figure it out from the code linke provided also.) Click login and then 'add employee' and just put the cursor in the firstname text field and click. You'll end up with the following error:

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at mx.managers::FocusManager/focusInHandler()[C:\autobuild\galaga\frameworks\projects\framew ork\src\mx\managers\FocusManager.as:601]
          at flash.display::Stage/set focus()
          at mx.core::UITextField/setFocus()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\ core\UITextField.as:1525]
          at mx.controls::TextInput/setFocus()[C:\autobuild\galaga\frameworks\projects\framework\src\m x\controls\TextInput.as:1832]
          at mx.managers::FocusManager/setFocus()[C:\autobuild\galaga\frameworks\projects\framework\sr c\mx\managers\FocusManager.as:553]
          at mx.managers::FocusManager/mouseDownHandler()[C:\autobuild\galaga\frameworks\projects\fram ework\src\mx\managers\FocusManager.as:1896]

       

      I know the problem is related to _defaultButton being null in focusInHandler of FocusManager (at least the debugger shows the problem here), but not sure why it's ******** there. You'll see in both simple view stacks I've set creationPolicy="all" (I even tried setting createionPolicy="all" on almost all the components.)

       

      View the main pertinent files:

      http://pastie.org/610389

       

      Download the sample app demonstrating the issue

      http://dl.getdropbox.com/u/86998/EmployeeMaintenanceTest.zip