2009
07.09

I’m certainly not a fan of anything writing out code for me, but when it comes to Getter and Setter functions, it can get a bit tedious.  Flash Builder 4 comes with a command that will generate that code for you. To do so, position your cursor inside your variable, then select Source->Generate Getter/Setter. It even adds the underscore before your private variable, which I do anyway so I like that. This is all great, but I can’t stand the way Flash Builder formats code.  There seems to be two camps when it comes to code formatting. One places opening curly braces on the next line, the other does not. Here is a great post by Grant Skinner on the topic.  Personally, I keep the open curly brace on the same line and Flash Builder does not. I’ve come to just deal with reformatting when FB creates my new classes, it’s like second nature now, but now that I have this getter/setter feature, I’d really like to change the way it formats.

FB4 also has an Event Handler Generator which comes up in your code hinting inside MXML.

4 comments so far

Add Your Comment
  1. I totally agree that FB needs to change the way it formats code…ideally allowing the user the ability to set preferences. MY preference, personally, is for the opening “curly braces” to be indented second-line.

    I look forward to more posts.
    Peace

  2. Great post! And my preference is the same as yours on brackets – same line. Why take up all that precious space?


  3. MedicamentSpot.com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. Low price drugs. Buy drugs online

    Buy:Zocor.Advair.Prozac.Lasix.Female Pink Viagra.Lipitor.Ventolin.Aricept.Lipothin.Buspar.Acomplia.Zetia.Cozaar.Benicar.Nymphomax.Amoxicillin.SleepWell.Seroquel.Female Cialis.Wellbutrin SR….

  4. Candy http://tfoodteub6t.ACEHARDWAREE.INFO/tag/Holiday+sealer+Candy/ : sealer…

    sealer…