7 Replies Latest reply on Nov 26, 2009 11:11 PM by Grauzone

    Error 1009  at Drag and Drop

    Grauzone Level 1



      iam loading an Flex app into an Flash App. In the Flex App is an Drag an Drop with a List. Its crazy , but when the Flash App loads the Flex app for the fist time the Drag and Drop works fine. But when i unload it and load it for the second time it throws this Error:


      TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
           at mx.managers.dragClasses::DragProxy()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\dragClasses\DragProxy.as:74]
           at mx.managers::DragManagerImpl/doDrag()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\DragManagerImpl.as:264]
           at mx.managers::DragManager$/doDrag()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\DragManager.as:243]
           at mx.controls.listClasses::ListBase/dragStartHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:9182]
           at flash.events::EventDispatcher/dispatchEventFunction()
           at flash.events::EventDispatcher/dispatchEvent()
           at mx.core::UIComponent/dispatchEvent()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:9408]
           at mx.controls.listClasses::ListBase/mouseMoveHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:8919]


      I can't figure out what kind of Error this is!? Can someone help me? How can i solve this Problem!?

        • 1. Re: Error 1009  at Drag and Drop
          David_F57 Level 5



          I got lost at spitz un sparkens, german errors aren't my strength, at a guess, using my stalag 13 interpretation skills, it would seem you have killed something off in the unload and it doesn't get reinstantiated. Probably seeing the code would be more helpful.



          • 2. Re: Error 1009  at Drag and Drop
            Grauzone Level 1

            Its not hard to figure out that


            Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.

               is the same as:

            Cannot access a property or method of a null object reference.


                stalag 13 ...very funny..... ha ha ..du trottel

                    wenn man keine ahnung hat .... ganz einfach mal den Mund halten.

            • 3. Re: Error 1009  at Drag and Drop
              David_F57 Level 5

              Well, even if I had no idea, it is still worth investigating why in the first instance you have no issues with null pointers but once you 'unload' something the issue begins, if a little light humour isn't to your taste such is life. (Ich bin nicht dumm, nur ein wenig langsam) , mit spitz n sparkens was a terminology we used in college every time we blew up some piece of electronic equipment as a way of explaining its lack of functionality. Much like all computers run on smoke, logical becuase when you let the smoke out they stop working.


              Anyway back to the issue as I said these sort of problems are always easier to appreciate(auch für ein Narr wie ich) when the possibly offending code accompanies the request for help.





              ps: Never tell an australian to keep his mouth shut, it just inspires us to greater acts of stupidity

              • 4. Re: Error 1009  at Drag and Drop
                mewk Level 3

                Ihre Objekte sind zu mir gehören!!! LOL I took a year of German, stayed in Berlin for a month and all I can remember is... Scheiße!


                Ok, so about this problem of yours... it's been brought up in this forum before -- Error 1009 on drag/drop events within lists when those lists are not in the main application domain (whether it's a pop up or some module). See the post here:



                A bug was supposed to have been created for this issue. If not, I recommend you submit a new bug and reference yours and the other post's test case. Also worth asking the other poster if they came up with a workaround.


                My hunch is that whatever is tripping you up is internal and non trivial (i.e. I have no idea why this is happening and have no obvious workaround for you ). Best o luck,


                - e

                • 5. Re: Error 1009  at Drag and Drop
                  David_F57 Level 5

                  hi Mewk,


                  I haven't really had trouble with modules, i.e this is an extremely simple case but you can go in and out of the module as you please. dragging between the lists.


                  http://gumbo.flashhub.net/basicmodule/   (view source enabled).




                  • 6. Re: Error 1009  at Drag and Drop
                    mewk Level 3

                    @David, thanks for the code. We should also test for drag/drops within the module itself, but with that said, I tried modules (with minor change to your code), sub apps, and also popups... all WORKING.


                    I also revisited 80sRelics' code and discovered that his app wasn't working b/c the base class for his popup was <s:Group> and for a popup, you really need something that hosts FocusManager (most containers do, just not Group).


                    - e

                    • 7. Re: Error 1009  at Drag and Drop
                      Grauzone Level 1

                      thank you for your answers.

                      I know the Problems with the Manager instantiation in the Main App, who declared in Modules, but this was not the Problem. I tryed that workaround before i post this.


                      I found out that the Problem has anything to do with the LoaderContext. The FlashApp  loads the FlexApp with  with the LoaderContext ApplicationDomain.currentDomain. After deleting this, everything works fine.


                      And until the next Problem we will discuss, please learn a little bit better german, no more quotes form TV series. :-P