Still not success. I gave an example.
My user enter something e.g. login name and
then program display the full name.
private function DoChecking(S:String):String {
.......
if (TryOnce) then {
return "Already Tried";
}
else {
return "First Time";
}
}
<mx:Label id="ShowName" text="{DoChecking(login)}"></mx:Label>
First time is ok but when another button is clicked and change
the variable TryOnce. The label 'ShowName' cannot be refreshed
eventhough I use ShowName.validatedisplaylist(). I also tried
validatenow()....but not success....Any help ?
--- In [email protected], Laurent Cozic <[EMAIL PROTECTED]>
wrote:
>
> Somebody ask a similar question on this list recently. You can loop
through all the components in your app by using the numChildren
property and getChildAt method:
>
> function checkAllButtons(container) {
>
> ?for (var i = 0; i < container.numChildren; i++) {
> ??var c = container.getChildAt(i);
> ??if (c is Container) {
> ???checkAllButtons(c);
> ??} else {
> ???if (c is Button) {
> ????// Do your changes here
> ???}
> ??}
> ?
> }
>
>
> Then start the process by passing the application as a parameter:
>
> checkAllButtons(Application.application);
>
>
>
>
> --
> Laurent Cozic
>
> Flash, Flex and Web Application development
> http://pogopixels.com
>
> --- On Tue, 8/12/08, itdanny2002 <[EMAIL PROTECTED]> wrote:
> From: itdanny2002 <[EMAIL PROTECTED]>
> Subject: [flexcoders] Loop through all visual components
> To: [email protected]
> Date: Tuesday, August 12, 2008, 9:19 AM
>
>
>
>
>
>
>
>
>
>
>
> I have created a custom button and used it
>
> throughoutly in my FLEX application. How
>
> can I change it dynamically by looping through
>
> all components ? Is there any like "children"
>
> stuff and then use "ValidateDisplayLis t" to
>
> make it refresh ? Actually, it likes changing
>
> the skin dynamically. But I need to check the
>
> content of button before modification.
>
>
>
> Having example is great. Thanks in advance.
>