actionscript 3 - Adobe Flex Builder 3 : Cannot add any method/function to any class of an existing project? -


I'm totally new to Adobe Flex Builder. I have been assigned a fully functional project, but when I want to add is the simplest task for any class, I always get the same error:

the constant type

For example, with a reference to a possibly undefined method, some random classes have function defined in such a way:

  public function GetID (): String {return m_strID; }   

If I try to define a new one below:

  public function GetIDFoo (): string {return m_strID; }   

And then I try to call both of them like this:

  trace ("this line is fine:" + oPhysicalScreen.GETID ()); Trace ("This line gives me an error:" + Oficialscreen. GetIDFu ());   

Any clues?

Regards, Michelle

PS: The complete code where I am calling:

  Public function updated physical screen data (Oscronnode: XML): zero {if (M_vPhysicalScreens == empty) {Return; } Var oScreenList: CMultyList = m_rBasicScreen.GetPhysicalScreensPanel (). GetScreenList (); Var OFFICIALSCREEN: CPhysicalScreen = FindPhyysicalScreen (oScreenNode. @ ID); If (physical screen == empty) {physical screen = new CPhysicalScreen (); {PhysicalScreen Start (Oscirnode. @ Id); OPhysicalScreen.SetInfo (oScreenNode @ info.); Var eList: uint = oScreenNode @list; If (eList & lt; SCREENS_LIST_TITLES.length) {oScreenList.SelectCurrentList (eList); } Else {oScreenList.SelectCurrentList (2); // test} oNewEntry: centry = oScreenList.CreateEntryInCurrentList (oPhysicalScreen.GetID () + "" + oPhysicalScreen.GetInfo (), oPhysicalScreen); // oNewEntry: centry = oScreenList.CreateEntryInCurrentList (oPhysicalScreen.GetDisplayName (), oPhysicalScreen); ONewEntry.ChangeTextColor (CPanelPhysicalScreens.STATE_COLORS [oPhysicalScreen.GetState ()]); } M_v physicalscreen Adware (official); } If (! OPhysicalScreen = null) {// should never be null but ... trace ("UpdatePhysicalScreenData:" + oPhysicalScreen.GetID () + "" + oPhysicalScreen.GetInfo () + 'state: "+ oPhysicalScreen.GetState ()); Trace ("UpdatePhysicalScreenData:" + oPhysicalScreen.GetIDFoo () + "" + oPhysicalScreen.GetInfo () + 'State: "+ oPhysicalScreen.GetState ()); } Physical Screens. Sedifffusion (oScreenNode. @ DiffusionCode); OPhysicalScreen.SetCurrentSequence (int (oScreenNode @ currentSequence)); OficialScreen.SetSeleve (Oscirnode. @ Live == "true"); }   

Beginning the definition of class:

  public class CPhysicalScreen {public static var STATE_UNUSED: uint = 0; Public stable var STATE_SYNC: uint = 1; Public static var STATE_UNSYNC: uint = 2; Public static var STATE_KO: uint = 3; Public Static War STATE_MAX_WAIT_TIME: uint = 5000; Private var m_strID: string; Private var m_eState: uint; Private var m_strInfo: string; Private var m_strDiffusionCode: string; Private var m_uiCurrentSequence: int; Private var m_bIsAlive: boolean; Public function CPhysicalScreen () {super (); M_strID = Faucet; M_eState = STATE_UNUSED; M_stroinfo = ""; M_strDiffusionCode = ""; M_uiCurrentSequence = 0; M_bIsAlive = false; } Public Function GetID (): string {return m_strID; } Public Function GetIDFoo (): string {return m_strID; }   

...

the post you posted There is no end to it }
You may also have to wrap it in the package.

Comments