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, "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:
>                   }
>             }
> 
> 
> 
> Jerry Davidson
> Illinois DHS/MIS/
> Client Systems/Update Unit
> (217) 558-2194
> jerry.davidson@...
>


Reply via email to