1 Reply Latest reply on Sep 1, 2006 1:22 PM by peterent

    data type question

    mygraneboy
      hello

      i am trying to use a function to open a titlewindow. this function recieves an argument from the button pressed ie fn_openwindow(taskpop).

      the function

      private function showLogin(aParam:String):void {

      var helpWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, aParam, false));
      helpWindow.title=aParam;
      helpWindow.setStyle("borderAlpha", 0.9);
      }

      using this generates the error"Implicit coercicion of value of type String to an unrelated type Class

      how can i convert this to the correct datatype so it works
        • 1. Re: data type question
          peterent Level 2
          The second argument to createPopUp is the class (or type) of object to use for the pop-up. Since you want a TitleWindow:

          import mx.containers.TitleWindow; // so you have the definition
          ...
          createPopUp( this, TitleWindow, false ); // no quotes around TitleWindow - you want to pass the actual class