I agree, with Gordon, do that and if that doesn't work, I'm willing to bet that your first if-statement you actually have "if( stat=2 )" as opposed to "if( stat==2 )"
Patrick On Sat, Feb 23, 2008 at 12:09 AM, Gordon Smith <[EMAIL PROTECTED]> wrote: > That makes no sense and would be an extremely interesting bug if stat > is really being set to 1. > > If you replace the line > > var stat:Number = Number(arrPeriodeLirs.getItem(0).status); > > with > > var stat:Number = 1; > > what do you get? Or, if you're using FlexBuilder, what do you see happen > as you step line by line through this code? > > Gordon Smith > Adobe Flex SDK Team > > ------------------------------ > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Harry Saputra > *Sent:* Friday, February 22, 2008 8:55 PM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Bug on IF..ELSE Condition Or What ? > > I get confuse with this. I have very2 simple conditional structure like > that > : > > ... > var stat:Number = Number(arrPeriodeLirs.getItemAt(0).status); > > if (stat==2) > { > Alert.show('Error number 2','error'); > } > > else if ( stat==1 ) > { > Alert.show('Error number 1','error'); > } > > else if (stat==0) > { > Alert.show('Error number 0','error'); > } > > else if ( dataMahasiswa.getItemAt(0).statusmhs != 'Active' ) > { > Alert.show('Error number 4','error'); > } > > else > { > semester(); > } > ... > > What the problem ? > > When I get stat value = 1 ( I check on service management ) , the result > is > 'Error number 2'.. why ? > Thanks > > >