But yeah, it would help those of us who use something other than four space indents if it were cleaned up. Personally, I find 4 spaces makes things way to wide for my tastes.
The convention is 4 spaces for an indent, tabs are converted to 4 spaces. I imagine everyone uses fixed-width fonts and Eclipse doesn't show whitespace characters (that I know of, to-date) so code formatting like this must have just slipped through the cracks (in my experience this is not unusual for large source bases). FWIW, in the past I've heard arguments of not doing such clean-ups as it complicates change history, however modern source control systems have the ability to do diffs ignoring whitespace so this point is somewhat moot.
From: [email protected] [mailto: [email protected]] On Behalf Of Pan Troglodytes
Sent: Friday, July 21, 2006 12:53 PMTo: flexcoders
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
--
Jason __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

