Did you say you are using a custom editor? Do you have FlashBuilder or another Flex IDE? Is it confused about brace matching? If not, it could be the editor you are using.
On 2/7/13 10:33 AM, "Davidson, Jerry" <jerry.david...@illinois.gov> wrote: Jay, Thanks for the response. And thanks for the heads up. And thanks for not commenting on how silly a single case is. I removed the braces from the case statement and I continue to have the cursor before either the last or the next t last closing brace pointing to the first open one. Jerry From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of jaywood58 Sent: Thursday, February 07, 2013 10:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Code not lining up - brackets Jerry, I think your issue is the opening brace at line 6 (right after case Const.ALERT_LIST_RETRIEVED:) and the closing brace at line 32 (right after the break statement)... the code block for a case statement in ActionScript is typically not enclosed in braces (perhaps it is even illegal, I'm not sure). Instead, the code is delimited by the case statement itself and the break. Either way, your closing brace at line 32 overlaps your break statement at line 31. I suggest removing those two braces or at least moving the closing brace above the break. Jay Wood Sr. Flex Developer Tech4Learning, Inc. --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Davidson, Jerry" wrote: > > This is a very small problem. I'm using RAD to develop in flex. When I get a > module someone else has written, I try to "pretty print" it to make it easier > to work with. While doing this on the below, I found the braces didn't add up > right. That is, the last one should apply to the first one (proc statement), > and it does. The second to last should apply to the second one (switch > statement), but it doesn't. Put the cursor after it and it also points to the > first one. > > Am I missing something? I ran clean and refresh on it. > > public function set _checkStatus(status:String):void > { > switch (status) > { > case Const.ALERT_LIST_RETRIEVED: > { > if (model.userAlertsVOvar != null && model.showAlert == true) > { > if (model.userAlertsVOvar.length > 0) > { > var ctr:int = 0; > for each (var alertRow:Object in model.userAlertsVOvar) > { > if( StringUtil.trim(alertRow.individualName) == "" > && StringUtil.trim(alertRow.description ) == "" ) > { > ctr = ctr + 1; //increment ctr > } > } > > if (ctr < model.userAlertsVOvar.length) > { // SHOW ALERT - all rows do not have blank data > alertPopup = new AlertComp(); > PopUpManager.addPopUp(alertPopup, this, false); > PopUpManager.centerPopUp(alertPopup); > model.showAlert=false; > } > } > } > model.applicationStatus = null; > break; > } > default: > } > } > > -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui