> c'mon adobe guys! you can do it ;)
 
When we implemented <mx:Repeater>, we considered whether to add
conditional tags like <mx:If>. We decided against it on the grounds that
it would be confusing about whether these tags worked at compile time or
at runtime. We felt that dynamic runtime logic belongs in script, not in
declarative syntax.
 
- Gordon

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Aldo Bucchi
Sent: Thursday, May 31, 2007 5:41 PM
To: [email protected]
Subject: [flexcoders] Re: Brainstorming; Dynamic Conditionals in MXML



ok,

just realized that you can accomplish something similar by using
navigators... just set creationPolicy="auto" and conditionally set the
selectedIndex... only it will just work under some particular
circumstances and is quite hacky.

i need to destroy children when the condition changes, to avoid
parameter problems... but still. that only leaves me with binding
issues.

OTOH, the ideal way would be to create a custom component that
implements IRepeater so that containers don't add it, and then play
with createChildrenFromDescriptors and such.

i just gave the latter a try and got it kinda working, but it would
take toooooooooo much time to make it work with bindings and stabilize
it. i give up.

c'mon adobe guys!
you can do it ;)

best,
Aldo

On 5/31/07, Aldo Bucchi <[EMAIL PROTECTED]
<mailto:aldo.bucchi%40gmail.com> > wrote:
> Hi Guys,
>
> Has anyone flirted with the idea of creating MXML
> conditional-structure components that can be used to dynamically
> generate interfaces??
>
> just to be more graphical... something like this
>
> <mx:Repeater id="rep2"
dataProvider="{rep1.currentItem.elements('*')}">
>
> <foo:If condition="[EMAIL PROTECTED]'super'}">
>
> <foo:SuperLabel text="[EMAIL PROTECTED]"/>
>
> <foo:Else>
>
> <mx:Label text="[EMAIL PROTECTED]"/>
>
> </foo:Else>
>
> </foo:If>
>
> </mx:Repeater>
>
> it just makes a lot of sense...
> any ideas????
>
> best,
> Aldo
>
>
> --
> ::::: Aldo Bucchi :::::
> mobile +56 9 8429 8300
>

-- 
::::: Aldo Bucchi :::::
mobile +56 9 8429 8300


 

Reply via email to