I wrote up a description of the PercentProxy metadata tag a long time ago.
It was for Flex 2, but I think it still applies to Flex 3 as well.  Also,
see the docs.

http://nondocs.blogspot.com/2007/04/metadatapercentproxy.html

- Daniel Freiman


On Thu, Jun 12, 2008 at 3:49 PM, Baz <[EMAIL PROTECTED]> wrote:

>   Hi,
>
> A really convenient feature of flex is how you can provide either a PERCENT
> or ABSOLUTE measurement for WIDTH or HEIGHT of containers, and the compiler
> figures out which is which for you.
>
> I have a component called "Content" which is composed of two other
> components called "LeftColumn" and "RightColumn". I would like for whoever
> is using the "Content" component to be able to supply a "leftColumnWidth" in
> either PERCENT or ABSOLUTE. The value would then get passed directly into
> the WIDTH attribute of the internal sub-component "LeftColumn". Basically, I
> just need to pass-through a value from one component to another.
>
> The problem is what data type to make the "leftColumnWidth" property? A
> STRING does not accept the absolute values, and a NUMBER does not accept
> percentages. The framework itself uses a compiler directive called
> PERCENTPROXY to solve this issue before it even gets to the data type, but
> is that what I should do too just to pass a value from one component to
> another?
>
> Thanks for reading this,
> Baz
>  
>

Reply via email to