0 Replies Latest reply on Mar 19, 2007 2:56 AM by Nico22_be

    Error : simple Panel component : no more ID?

    Nico22_be
      Hi all,

      I made a simple class :

      package {
      public class MyPanel extends Panel
      {
      public function MyPanel ()
      {
      super();
      }
      }
      }

      As simple as that. Before I define this simple component, my code was like this :

      <mx:Panel
      id = "mainPanel"
      x="131" y="84" width="719" height="609"
      borderColor="#000000" borderStyle="solid"
      borderThickness="1" backgroundColor="#dddddd"

      dragEnter="dragEnterHandler(event);"
      dragExit="dragExitHandler(event);"
      dragDrop="dragDropHandler(event);">
      </mx:Panel>

      Now, I changed it to this :


      I made a simple class :

      package {
      public class MyPanel extends Panel
      {
      public function MyPanel ()
      {
      super();
      }
      }
      }

      As simple as that. Before I define this simple component, my code was like this :

      <myProject:MyPanel
      id = "mainPanel"
      x="131" y="84" width="719" height="609"
      borderColor="#000000" borderStyle="solid"
      borderThickness="1" backgroundColor="#dddddd"

      dragEnter="dragEnterHandler(event);"
      dragExit="dragExitHandler(event);"
      dragDrop="dragDropHandler(event);">
      </mx:MyPanel>

      If I remove the id="mainPanel" line, it works fine. If I keep it, I get the following error :

      1046: Type was not found or was not a compile-time constant: MyPanel.

      Ant idea? Thank you