Hi,
today I'm playing with While + EndWhile, but again some issues.
WhileEx "[TextEntry1]<[#32] and [TextEntry2]<[#32]"
AlertBox "Error" "Empty fileds"
Else
AlertBox "OK" "Now the code will countinue"
EndWhile
. And here starts the rest of the code
I think i do something wrong... When [TextEntry1] and [TextEntry2] are True, than the code will continue on the page, but
if Flase and they are empty than the rest of the code will not execute.
What should i change?
Thanks
D
WhileEx and AndWhile
Moderator: Neosoft Support
Re: WhileEx and AndWhile
Dudus:
1) You can not use Else inside WhileEx/EndWhile ... only inside a If/Endif or IfEx/EndIf code block.
2) If you are merely trying to check contents of TextEntry boxes, you do not need to use WhileEx/WhileEnd, just place this code in the Text Change section of each of the TextEntry boxes ...
... and your subroutine would look like ...
3) If you have reason to use While/EndWhile or WhileEx/EndWhile in other circumstances, you can use ExitWhile to exit the loop.
1) You can not use Else inside WhileEx/EndWhile ... only inside a If/Endif or IfEx/EndIf code block.
2) If you are merely trying to check contents of TextEntry boxes, you do not need to use WhileEx/WhileEnd, just place this code in the Text Change section of each of the TextEntry boxes ...
Code: Select all
GoSub "CheckForEmpty"
Code: Select all
:CheckForEmpty
IfEx"[TextEntry1]<[#32] and [TextEntry2]<[#32]"
AlertBox "Error" "Empty fields"
EndIf
Return
Re: WhileEx and AndWhile
Hi Gave,
thank you I found some other solution:
WhileEx "[TextEntry1]<[#32] or [TextEntry2]<[#32]"
AlertBox "Error" "Must be filled"
Else
EndWhile
AlertBox "Okay" "Now it's correct"
Duus
thank you I found some other solution:
WhileEx "[TextEntry1]<[#32] or [TextEntry2]<[#32]"
AlertBox "Error" "Must be filled"
Else
EndWhile
AlertBox "Okay" "Now it's correct"
Duus
Re: WhileEx and AndWhile
Code: Select all
WhileEx "[TextEntry1]<[#32] or [TextEntry2]<[#32]"
AlertBox "Error" "Must be filled"
Else
EndWhile
AlertBox "Okay" "Now it's correct"
THIS DOES NOT WORK. RUN THE PRG WITH 'F9' AND SEE THE 'DEBUGGER-ACTIONS'
COSTA RICA
PURA VIDA
PURA VIDA