Thanks Daniel,

I am actually using PercentProxy right now, and it is purely because of your
write-up. There is no other information about it on the entire web! Not
kidding.

Even though I am doing it, I find it weird to duplicate all this logic that
flex usually takes care of only to pass a value through from one component
to another. Is there an obvious architectural opportunity that I am
overlooking? When people build their own custom components, do they not
mimic this feature of flex? It seems like this should be common place, but
its not, and I guess I just want to know why.

Cheers,
Baz



On Thu, Jun 12, 2008 at 4:26 PM, Daniel Freiman <[EMAIL PROTECTED]> wrote:

>   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