[flexcoders] logic problem

2007-09-26 Thread candysmate
I have two textInput components. This code: if((goodsInAccount.text != ) (goodsInAdvice.text.indexOf(/) == 0)) { . } but it returns true when goodsInAccount contains no text and goodsInAdvice contains the / character. The problem seems to be with the logic knowing that

Re: [flexcoders] logic problem

2007-09-26 Thread Tom Chiverton
On Wednesday 26 Sep 2007, [EMAIL PROTECTED] wrote: Maybe I've just not had enough coffee yet, or is this a known bug? There is unlikely to be a bug in core Text classes or base AS logic. Have you set a break point and verified the values are what you expect ? -- Tom Chiverton Helping to

Re: [flexcoders] logic problem

2007-09-26 Thread Ralf Bokelberg
Maybe text is null? Cheers Ralf. On 9/26/07, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 26 Sep 2007, [EMAIL PROTECTED] wrote: Maybe I've just not had enough coffee yet, or is this a known bug? There is unlikely to be a bug in core Text classes or base AS logic. Have you set a break

Re: [flexcoders] logic problem

2007-09-26 Thread leds usop
Having no text doesnt mean the string value is . An Empty string is different from a null or an undefined value. So i suggest throw in a check for undefined/null value as well and if you dont turst that enough, check for the length as well. Moreover, when you say goodsInAdvice.text.indexOf(/)