3 Replies Latest reply on Mar 17, 2008 9:46 AM by sharonma

    Lose classes

    Gene Godsey Level 1
      In FlexBuilder 3 When I daclare variables where the classes are not imported, when I declare that variable and tab to the next line all of the other imports disappear in the editor.

      What's up with that?

      It is so very annoying. Is there some kind on configuration in the options that can assist me with this?
        • 1. Re: Lose classes
          sharonma Level 1
          Hi Gene,

          Does it happen with certain projects or new project as well? Can you provide a simple reproducible test case? I'm unable to reproduce your problem with a very simple class.

          thanks,
          Sharon
          • 2. Re: Lose classes
            Gene Godsey Level 1
            This happens with a new project and existing projects.
            case in point:

            I have this code:
            ------------------------
            package comps{

            import mx.controls.TextInput;
            import flash.events.Event;

            [Event(name="lengthOf5Event", type="flash.events.Event")]
            [Event(name="lengthOf10Event", type="flash.events.Event")]

            public class TextInputWithCountEvent{
            private var _myText:str
            public function TextInputWithCountEvent(){

            }

            }
            }
            ------------------------
            I type in private var eventObj:Event;
            The code changes to:
            ------------------------
            package comps{

            import flash.events.Event;

            import mx.controls.TextInput;

            [Event(name="lengthOf5Event", type="flash.events.Event")]
            [Event(name="lengthOf10Event", type="flash.events.Event")]

            public class TextInputWithCountEvent extends TextInput{

            private var _myText:String;
            private var eventObj:Event;

            public function TextInputWithCountEvent(){
            _myText = s;

            }

            }
            }
            ------------------------

            The code assist-Enable auto activation under the flex editor has been deselected.

            Now what else have I missed?

            Thanks,
            Gene
            • 3. Re: Lose classes
              sharonma Level 1
              Hi Gene,

              You can turn it off in Preferences:
              1. Go to Window-> Preferences...-> Flex-> Editors-> ActionScript Code.
              2. Uncheck "Keep imports organized" and "Remove unused imports when organizing".

              thanks,
              Sharon