Remind me to have you do a code review before I post code, lol!
 
----- Original Message -----
Sent: Friday, July 21, 2006 12:53 PM
Subject: [flexcoders] clean up on aisle three - formatting request for Adobe

At some point, it would be nice if someone could go through the various AS files in the SDK and standardize on using space for indent or tabs for indent - not both.  This is especially bad because it appears some coders there use proportional fonts (sacrilege!).  Anyone doing that has no business using spaces to indent. XD

For example, here's what I see using fixed width font and two space tabs (DataGrid.as):


    override protected function mouseOverHandler(event:MouseEvent):void
    {
    if (movingColumn)
      return;

        var r:IListItemRenderer;
        if (enabled && sortableColumns && showHeaders && listItems.length
          && !isPressed)
        {
      s = Sprite(listContent.getChildByName("sortArrowHitArea"));

      if (event.target != s)
        r = mouseEventToItemRenderer(event);

            var n:int = listItems[0].length;
      for (var i:int = 0; i < n; i++)
            {
        if (!r && s == event.target &&
          visibleColumns[i].colNum == sortIndex)
        {
          r = listItems[0][i];
        }

                if (r == listItems[0][i])
                {
                    if (visibleColumns[i].sortable)
                    {
                        var s:Sprite = Sprite(
              selectionLayer.getChildByName("headerSelection"));
                        if (!s)
                        {
                            s = new FlexSprite();
                            s.name = "headerSelection";
                            selectionLayer.addChild(s);
                        }

            var g:Graphics = s.graphics;
            g.clear ();
                        g.beginFill(getStyle("rollOverColor"));
                        g.drawRect(0, 0, visibleColumns[i].width, rowInfo[0].height - 0.5);
                        g.endFill();

            s.x = r.x;
                        s.y = rowInfo[0].y;
                    }
                    return;
                }
            }
        }
        lastItemDown = null;

        super.mouseOverHandler(event);
    }



OUCH.

--
Jason __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to