You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Harbs <ha...@gmail.com> on 2020/01/13 12:30:53 UTC

Evaluating brackets

I have the following markup:

<sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;' size="4" style="white-space:break-spaces;”/>

I’m trying to display markup in the text property of a component.

It shoould be displayed as:
<sp:AssetList dataProvider="{provider}”/>

But it’s displayed as:
<sp:AssetList dataProvider="[object Object],[object Object],[object Object]”/>

It looks to me like the Royale compiler is evaluating the brackets in the text.

FWIW, I also tried:
<sp:Code text='&lt;sp:AssetList dataProvider="&#123;provider&#125;"/&gt;' size="4" style="white-space:break-spaces;"/>

and got the same result.

I think this is a bug. Thoughts?

Harbs

Re: Evaluating brackets

Posted by Harbs <ha...@gmail.com>.
Thanks! Your report was clearer than what I would have written… ;-)

Harbs

> On Jan 14, 2020, at 10:28 PM, Greg Dove <gr...@gmail.com> wrote:
> 
> I was just going to ask you the same thing! Yes, I'll do it
> 
> 
> On Wed, Jan 15, 2020 at 9:26 AM Harbs <ha...@gmail.com> wrote:
> 
>> You want to capture the issue on Github?
>> 
>>> On Jan 14, 2020, at 10:25 PM, Greg Dove <gr...@gmail.com> wrote:
>>> 
>>> actually that's not right. It is still creating a binding which is
>>> returning the incorrect value, so not a direct value assignment.
>>> 
>>> 
>>> On Wed, Jan 15, 2020 at 9:23 AM Greg Dove <gr...@gmail.com> wrote:
>>> 
>>>> 
>>>> I think it is close to working. Seems to be including backslashes when
>> it
>>>> should not, and dropping second curly brace.
>>>> 
>>>> 
>>>> On Wed, Jan 15, 2020 at 9:18 AM Greg Dove <gr...@gmail.com> wrote:
>>>> 
>>>>> I tried it yesterday, yes. I did not doublecheck that this morning
>> though
>>>>> 
>>>>> 
>>>>> On Wed, Jan 15, 2020 at 9:16 AM Harbs <ha...@gmail.com> wrote:
>>>>> 
>>>>>> Have you confirmed that the escape sequence which works in Flex
>> doesn’t
>>>>>> in Royale?
>>>>>> 
>>>>>>> On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
>>>>>>> 
>>>>>>> The escape sequence for binding that works in Flex, is single
>>>>>> backslash.
>>>>>>> I just quickly tested this now with <s:Label text="\{entry\}"  />
>>>>>>> 
>>>>>>> where entry was also defined locally as a [Bindable] in script block.
>>>>>>> That works.
>>>>>>> 
>>>>>>> 'I think this is rare enough that we have bigger fish to fry even if
>>>>>> it is
>>>>>>> a bug.'
>>>>>>> I agree. I suggest we log this as an issue and put it on backlog.
>>>>>>> 
>>>>>>> 
>>>>>>> On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <aharui@adobe.com.invalid
>>> 
>>>>>> wrote:
>>>>>>> 
>>>>>>>> IMO, the second example may not be escaped as we don't know the
>> escape
>>>>>>>> sequence for binding.  You have used an XML entity instead of the
>>>>>> brace,
>>>>>>>> but I think that immediately gets evaluated into the brace UTF-8
>>>>>> character
>>>>>>>> before parsing.  These entities are required for compliant XML, but
>>>>>> don't
>>>>>>>> mark the characters for the parsing phase.  It is similar to trying
>> to
>>>>>>>> inject "\n" into strings in Java and other languages.  The escape
>>>>>> sequence
>>>>>>>> might be \{ or {{ or something else, I don't know.  Or there isn't a
>>>>>>>> sequence and we need to invent one.
>>>>>>>> 
>>>>>>>> Of course, I could be wrong...
>>>>>>>> -Alex
>>>>>>>> 
>>>>>>>> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>>  It was escaped in the second example.
>>>>>>>> 
>>>>>>>>  I think this is rare enough that we have bigger fish to fry even
>>>>>> if it
>>>>>>>> is a bug.
>>>>>>>> 
>>>>>>>>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <
>> carlosrovira@apache.org>
>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>> I don't think is a bug too.
>>>>>>>>> If you want to translate to plain text you must escape it, or
>> better
>>>>>>>> make
>>>>>>>>> whole in a var in AS3 and display the value.
>>>>>>>>> 
>>>>>>>>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
>>>>>>>> (<ah...@adobe.com.invalid>)
>>>>>>>>> escribió:
>>>>>>>>> 
>>>>>>>>>> If I understand the scenario correctly, I don't think that's a
>>>>>>>> bug.  XML
>>>>>>>>>> characters are translated into UTF-8 characters which are then
>>>>>>>> parsed.  The
>>>>>>>>>> MXML Compiler is scanning all values for binding expressions.
>>>>>>>>>> 
>>>>>>>>>> It would be a bug if there is no way to escape {} in a value so
>>>>>>>> that it
>>>>>>>>>> isn't seen as a binding expression.  I honestly don't know if
>> there
>>>>>>>> is a
>>>>>>>>>> way or not.  I would check Flex documentation and use the Flex
>>>>>>>> compiler to
>>>>>>>>>> see if you can get {} to show up in a Flex label, then try the
>> same
>>>>>>>> syntax
>>>>>>>>>> in Royale.
>>>>>>>>>> 
>>>>>>>>>> My 2 cents,
>>>>>>>>>> -Alex
>>>>>>>>>> 
>>>>>>>>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>>>>>>>>>> 
>>>>>>>>>> I have the following markup:
>>>>>>>>>> 
>>>>>>>>>> <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>>>>>>>>>> size="4" style="white-space:break-spaces;”/>
>>>>>>>>>> 
>>>>>>>>>> I’m trying to display markup in the text property of a component.
>>>>>>>>>> 
>>>>>>>>>> It shoould be displayed as:
>>>>>>>>>> <sp:AssetList dataProvider="{provider}”/>
>>>>>>>>>> 
>>>>>>>>>> But it’s displayed as:
>>>>>>>>>> <sp:AssetList dataProvider="[object Object],[object
>>>>>>>> Object],[object
>>>>>>>>>> Object]”/>
>>>>>>>>>> 
>>>>>>>>>> It looks to me like the Royale compiler is evaluating the
>>>>>>>> brackets in
>>>>>>>>>> the text.
>>>>>>>>>> 
>>>>>>>>>> FWIW, I also tried:
>>>>>>>>>> <sp:Code text='&lt;sp:AssetList
>>>>>>>>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>>>>>>>>>> style="white-space:break-spaces;"/>
>>>>>>>>>> 
>>>>>>>>>> and got the same result.
>>>>>>>>>> 
>>>>>>>>>> I think this is a bug. Thoughts?
>>>>>>>>>> 
>>>>>>>>>> Harbs
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> Carlos Rovira
>>>>>>>>> 
>>>>>>>> 
>>>>>> 
>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>> 
>> 


Re: Evaluating brackets

Posted by Greg Dove <gr...@gmail.com>.
I was just going to ask you the same thing! Yes, I'll do it


On Wed, Jan 15, 2020 at 9:26 AM Harbs <ha...@gmail.com> wrote:

> You want to capture the issue on Github?
>
> > On Jan 14, 2020, at 10:25 PM, Greg Dove <gr...@gmail.com> wrote:
> >
> > actually that's not right. It is still creating a binding which is
> > returning the incorrect value, so not a direct value assignment.
> >
> >
> > On Wed, Jan 15, 2020 at 9:23 AM Greg Dove <gr...@gmail.com> wrote:
> >
> >>
> >> I think it is close to working. Seems to be including backslashes when
> it
> >> should not, and dropping second curly brace.
> >>
> >>
> >> On Wed, Jan 15, 2020 at 9:18 AM Greg Dove <gr...@gmail.com> wrote:
> >>
> >>> I tried it yesterday, yes. I did not doublecheck that this morning
> though
> >>>
> >>>
> >>> On Wed, Jan 15, 2020 at 9:16 AM Harbs <ha...@gmail.com> wrote:
> >>>
> >>>> Have you confirmed that the escape sequence which works in Flex
> doesn’t
> >>>> in Royale?
> >>>>
> >>>>> On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
> >>>>>
> >>>>> The escape sequence for binding that works in Flex, is single
> >>>> backslash.
> >>>>> I just quickly tested this now with <s:Label text="\{entry\}"  />
> >>>>>
> >>>>> where entry was also defined locally as a [Bindable] in script block.
> >>>>> That works.
> >>>>>
> >>>>> 'I think this is rare enough that we have bigger fish to fry even if
> >>>> it is
> >>>>> a bug.'
> >>>>> I agree. I suggest we log this as an issue and put it on backlog.
> >>>>>
> >>>>>
> >>>>> On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <aharui@adobe.com.invalid
> >
> >>>> wrote:
> >>>>>
> >>>>>> IMO, the second example may not be escaped as we don't know the
> escape
> >>>>>> sequence for binding.  You have used an XML entity instead of the
> >>>> brace,
> >>>>>> but I think that immediately gets evaluated into the brace UTF-8
> >>>> character
> >>>>>> before parsing.  These entities are required for compliant XML, but
> >>>> don't
> >>>>>> mark the characters for the parsing phase.  It is similar to trying
> to
> >>>>>> inject "\n" into strings in Java and other languages.  The escape
> >>>> sequence
> >>>>>> might be \{ or {{ or something else, I don't know.  Or there isn't a
> >>>>>> sequence and we need to invent one.
> >>>>>>
> >>>>>> Of course, I could be wrong...
> >>>>>> -Alex
> >>>>>>
> >>>>>> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
> >>>>>>
> >>>>>>   It was escaped in the second example.
> >>>>>>
> >>>>>>   I think this is rare enough that we have bigger fish to fry even
> >>>> if it
> >>>>>> is a bug.
> >>>>>>
> >>>>>>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <
> carlosrovira@apache.org>
> >>>>>> wrote:
> >>>>>>>
> >>>>>>> I don't think is a bug too.
> >>>>>>> If you want to translate to plain text you must escape it, or
> better
> >>>>>> make
> >>>>>>> whole in a var in AS3 and display the value.
> >>>>>>>
> >>>>>>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
> >>>>>> (<ah...@adobe.com.invalid>)
> >>>>>>> escribió:
> >>>>>>>
> >>>>>>>> If I understand the scenario correctly, I don't think that's a
> >>>>>> bug.  XML
> >>>>>>>> characters are translated into UTF-8 characters which are then
> >>>>>> parsed.  The
> >>>>>>>> MXML Compiler is scanning all values for binding expressions.
> >>>>>>>>
> >>>>>>>> It would be a bug if there is no way to escape {} in a value so
> >>>>>> that it
> >>>>>>>> isn't seen as a binding expression.  I honestly don't know if
> there
> >>>>>> is a
> >>>>>>>> way or not.  I would check Flex documentation and use the Flex
> >>>>>> compiler to
> >>>>>>>> see if you can get {} to show up in a Flex label, then try the
> same
> >>>>>> syntax
> >>>>>>>> in Royale.
> >>>>>>>>
> >>>>>>>> My 2 cents,
> >>>>>>>> -Alex
> >>>>>>>>
> >>>>>>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
> >>>>>>>>
> >>>>>>>>  I have the following markup:
> >>>>>>>>
> >>>>>>>>  <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
> >>>>>>>> size="4" style="white-space:break-spaces;”/>
> >>>>>>>>
> >>>>>>>>  I’m trying to display markup in the text property of a component.
> >>>>>>>>
> >>>>>>>>  It shoould be displayed as:
> >>>>>>>>  <sp:AssetList dataProvider="{provider}”/>
> >>>>>>>>
> >>>>>>>>  But it’s displayed as:
> >>>>>>>>  <sp:AssetList dataProvider="[object Object],[object
> >>>>>> Object],[object
> >>>>>>>> Object]”/>
> >>>>>>>>
> >>>>>>>>  It looks to me like the Royale compiler is evaluating the
> >>>>>> brackets in
> >>>>>>>> the text.
> >>>>>>>>
> >>>>>>>>  FWIW, I also tried:
> >>>>>>>>  <sp:Code text='&lt;sp:AssetList
> >>>>>>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
> >>>>>>>> style="white-space:break-spaces;"/>
> >>>>>>>>
> >>>>>>>>  and got the same result.
> >>>>>>>>
> >>>>>>>>  I think this is a bug. Thoughts?
> >>>>>>>>
> >>>>>>>>  Harbs
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Carlos Rovira
> >>>>>>>
> >>>>>>
> >>>>
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
>
>

Re: Evaluating brackets

Posted by Harbs <ha...@gmail.com>.
You want to capture the issue on Github?

> On Jan 14, 2020, at 10:25 PM, Greg Dove <gr...@gmail.com> wrote:
> 
> actually that's not right. It is still creating a binding which is
> returning the incorrect value, so not a direct value assignment.
> 
> 
> On Wed, Jan 15, 2020 at 9:23 AM Greg Dove <gr...@gmail.com> wrote:
> 
>> 
>> I think it is close to working. Seems to be including backslashes when it
>> should not, and dropping second curly brace.
>> 
>> 
>> On Wed, Jan 15, 2020 at 9:18 AM Greg Dove <gr...@gmail.com> wrote:
>> 
>>> I tried it yesterday, yes. I did not doublecheck that this morning though
>>> 
>>> 
>>> On Wed, Jan 15, 2020 at 9:16 AM Harbs <ha...@gmail.com> wrote:
>>> 
>>>> Have you confirmed that the escape sequence which works in Flex doesn’t
>>>> in Royale?
>>>> 
>>>>> On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
>>>>> 
>>>>> The escape sequence for binding that works in Flex, is single
>>>> backslash.
>>>>> I just quickly tested this now with <s:Label text="\{entry\}"  />
>>>>> 
>>>>> where entry was also defined locally as a [Bindable] in script block.
>>>>> That works.
>>>>> 
>>>>> 'I think this is rare enough that we have bigger fish to fry even if
>>>> it is
>>>>> a bug.'
>>>>> I agree. I suggest we log this as an issue and put it on backlog.
>>>>> 
>>>>> 
>>>>> On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <ah...@adobe.com.invalid>
>>>> wrote:
>>>>> 
>>>>>> IMO, the second example may not be escaped as we don't know the escape
>>>>>> sequence for binding.  You have used an XML entity instead of the
>>>> brace,
>>>>>> but I think that immediately gets evaluated into the brace UTF-8
>>>> character
>>>>>> before parsing.  These entities are required for compliant XML, but
>>>> don't
>>>>>> mark the characters for the parsing phase.  It is similar to trying to
>>>>>> inject "\n" into strings in Java and other languages.  The escape
>>>> sequence
>>>>>> might be \{ or {{ or something else, I don't know.  Or there isn't a
>>>>>> sequence and we need to invent one.
>>>>>> 
>>>>>> Of course, I could be wrong...
>>>>>> -Alex
>>>>>> 
>>>>>> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
>>>>>> 
>>>>>>   It was escaped in the second example.
>>>>>> 
>>>>>>   I think this is rare enough that we have bigger fish to fry even
>>>> if it
>>>>>> is a bug.
>>>>>> 
>>>>>>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org>
>>>>>> wrote:
>>>>>>> 
>>>>>>> I don't think is a bug too.
>>>>>>> If you want to translate to plain text you must escape it, or better
>>>>>> make
>>>>>>> whole in a var in AS3 and display the value.
>>>>>>> 
>>>>>>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
>>>>>> (<ah...@adobe.com.invalid>)
>>>>>>> escribió:
>>>>>>> 
>>>>>>>> If I understand the scenario correctly, I don't think that's a
>>>>>> bug.  XML
>>>>>>>> characters are translated into UTF-8 characters which are then
>>>>>> parsed.  The
>>>>>>>> MXML Compiler is scanning all values for binding expressions.
>>>>>>>> 
>>>>>>>> It would be a bug if there is no way to escape {} in a value so
>>>>>> that it
>>>>>>>> isn't seen as a binding expression.  I honestly don't know if there
>>>>>> is a
>>>>>>>> way or not.  I would check Flex documentation and use the Flex
>>>>>> compiler to
>>>>>>>> see if you can get {} to show up in a Flex label, then try the same
>>>>>> syntax
>>>>>>>> in Royale.
>>>>>>>> 
>>>>>>>> My 2 cents,
>>>>>>>> -Alex
>>>>>>>> 
>>>>>>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>>  I have the following markup:
>>>>>>>> 
>>>>>>>>  <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>>>>>>>> size="4" style="white-space:break-spaces;”/>
>>>>>>>> 
>>>>>>>>  I’m trying to display markup in the text property of a component.
>>>>>>>> 
>>>>>>>>  It shoould be displayed as:
>>>>>>>>  <sp:AssetList dataProvider="{provider}”/>
>>>>>>>> 
>>>>>>>>  But it’s displayed as:
>>>>>>>>  <sp:AssetList dataProvider="[object Object],[object
>>>>>> Object],[object
>>>>>>>> Object]”/>
>>>>>>>> 
>>>>>>>>  It looks to me like the Royale compiler is evaluating the
>>>>>> brackets in
>>>>>>>> the text.
>>>>>>>> 
>>>>>>>>  FWIW, I also tried:
>>>>>>>>  <sp:Code text='&lt;sp:AssetList
>>>>>>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>>>>>>>> style="white-space:break-spaces;"/>
>>>>>>>> 
>>>>>>>>  and got the same result.
>>>>>>>> 
>>>>>>>>  I think this is a bug. Thoughts?
>>>>>>>> 
>>>>>>>>  Harbs
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Carlos Rovira
>>>>>>> 
>>>>>> 
>>>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> 


Re: Evaluating brackets

Posted by Greg Dove <gr...@gmail.com>.
actually that's not right. It is still creating a binding which is
returning the incorrect value, so not a direct value assignment.


On Wed, Jan 15, 2020 at 9:23 AM Greg Dove <gr...@gmail.com> wrote:

>
> I think it is close to working. Seems to be including backslashes when it
> should not, and dropping second curly brace.
>
>
> On Wed, Jan 15, 2020 at 9:18 AM Greg Dove <gr...@gmail.com> wrote:
>
>> I tried it yesterday, yes. I did not doublecheck that this morning though
>>
>>
>> On Wed, Jan 15, 2020 at 9:16 AM Harbs <ha...@gmail.com> wrote:
>>
>>> Have you confirmed that the escape sequence which works in Flex doesn’t
>>> in Royale?
>>>
>>> > On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
>>> >
>>> > The escape sequence for binding that works in Flex, is single
>>> backslash.
>>> > I just quickly tested this now with <s:Label text="\{entry\}"  />
>>> >
>>> > where entry was also defined locally as a [Bindable] in script block.
>>> > That works.
>>> >
>>> > 'I think this is rare enough that we have bigger fish to fry even if
>>> it is
>>> > a bug.'
>>> > I agree. I suggest we log this as an issue and put it on backlog.
>>> >
>>> >
>>> > On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <ah...@adobe.com.invalid>
>>> wrote:
>>> >
>>> >> IMO, the second example may not be escaped as we don't know the escape
>>> >> sequence for binding.  You have used an XML entity instead of the
>>> brace,
>>> >> but I think that immediately gets evaluated into the brace UTF-8
>>> character
>>> >> before parsing.  These entities are required for compliant XML, but
>>> don't
>>> >> mark the characters for the parsing phase.  It is similar to trying to
>>> >> inject "\n" into strings in Java and other languages.  The escape
>>> sequence
>>> >> might be \{ or {{ or something else, I don't know.  Or there isn't a
>>> >> sequence and we need to invent one.
>>> >>
>>> >> Of course, I could be wrong...
>>> >> -Alex
>>> >>
>>> >> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
>>> >>
>>> >>    It was escaped in the second example.
>>> >>
>>> >>    I think this is rare enough that we have bigger fish to fry even
>>> if it
>>> >> is a bug.
>>> >>
>>> >>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org>
>>> >> wrote:
>>> >>>
>>> >>> I don't think is a bug too.
>>> >>> If you want to translate to plain text you must escape it, or better
>>> >> make
>>> >>> whole in a var in AS3 and display the value.
>>> >>>
>>> >>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
>>> >> (<ah...@adobe.com.invalid>)
>>> >>> escribió:
>>> >>>
>>> >>>> If I understand the scenario correctly, I don't think that's a
>>> >> bug.  XML
>>> >>>> characters are translated into UTF-8 characters which are then
>>> >> parsed.  The
>>> >>>> MXML Compiler is scanning all values for binding expressions.
>>> >>>>
>>> >>>> It would be a bug if there is no way to escape {} in a value so
>>> >> that it
>>> >>>> isn't seen as a binding expression.  I honestly don't know if there
>>> >> is a
>>> >>>> way or not.  I would check Flex documentation and use the Flex
>>> >> compiler to
>>> >>>> see if you can get {} to show up in a Flex label, then try the same
>>> >> syntax
>>> >>>> in Royale.
>>> >>>>
>>> >>>> My 2 cents,
>>> >>>> -Alex
>>> >>>>
>>> >>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>>> >>>>
>>> >>>>   I have the following markup:
>>> >>>>
>>> >>>>   <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>>> >>>> size="4" style="white-space:break-spaces;”/>
>>> >>>>
>>> >>>>   I’m trying to display markup in the text property of a component.
>>> >>>>
>>> >>>>   It shoould be displayed as:
>>> >>>>   <sp:AssetList dataProvider="{provider}”/>
>>> >>>>
>>> >>>>   But it’s displayed as:
>>> >>>>   <sp:AssetList dataProvider="[object Object],[object
>>> >> Object],[object
>>> >>>> Object]”/>
>>> >>>>
>>> >>>>   It looks to me like the Royale compiler is evaluating the
>>> >> brackets in
>>> >>>> the text.
>>> >>>>
>>> >>>>   FWIW, I also tried:
>>> >>>>   <sp:Code text='&lt;sp:AssetList
>>> >>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>>> >>>> style="white-space:break-spaces;"/>
>>> >>>>
>>> >>>>   and got the same result.
>>> >>>>
>>> >>>>   I think this is a bug. Thoughts?
>>> >>>>
>>> >>>>   Harbs
>>> >>>>
>>> >>>>
>>> >>>
>>> >>> --
>>> >>> Carlos Rovira
>>> >>>
>>> >>
>>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
>>> >>
>>> >>
>>> >>
>>> >>
>>>
>>>

Re: Evaluating brackets

Posted by Greg Dove <gr...@gmail.com>.
I think it is close to working. Seems to be including backslashes when it
should not, and dropping second curly brace.


On Wed, Jan 15, 2020 at 9:18 AM Greg Dove <gr...@gmail.com> wrote:

> I tried it yesterday, yes. I did not doublecheck that this morning though
>
>
> On Wed, Jan 15, 2020 at 9:16 AM Harbs <ha...@gmail.com> wrote:
>
>> Have you confirmed that the escape sequence which works in Flex doesn’t
>> in Royale?
>>
>> > On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
>> >
>> > The escape sequence for binding that works in Flex, is single backslash.
>> > I just quickly tested this now with <s:Label text="\{entry\}"  />
>> >
>> > where entry was also defined locally as a [Bindable] in script block.
>> > That works.
>> >
>> > 'I think this is rare enough that we have bigger fish to fry even if it
>> is
>> > a bug.'
>> > I agree. I suggest we log this as an issue and put it on backlog.
>> >
>> >
>> > On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <ah...@adobe.com.invalid>
>> wrote:
>> >
>> >> IMO, the second example may not be escaped as we don't know the escape
>> >> sequence for binding.  You have used an XML entity instead of the
>> brace,
>> >> but I think that immediately gets evaluated into the brace UTF-8
>> character
>> >> before parsing.  These entities are required for compliant XML, but
>> don't
>> >> mark the characters for the parsing phase.  It is similar to trying to
>> >> inject "\n" into strings in Java and other languages.  The escape
>> sequence
>> >> might be \{ or {{ or something else, I don't know.  Or there isn't a
>> >> sequence and we need to invent one.
>> >>
>> >> Of course, I could be wrong...
>> >> -Alex
>> >>
>> >> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
>> >>
>> >>    It was escaped in the second example.
>> >>
>> >>    I think this is rare enough that we have bigger fish to fry even if
>> it
>> >> is a bug.
>> >>
>> >>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org>
>> >> wrote:
>> >>>
>> >>> I don't think is a bug too.
>> >>> If you want to translate to plain text you must escape it, or better
>> >> make
>> >>> whole in a var in AS3 and display the value.
>> >>>
>> >>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
>> >> (<ah...@adobe.com.invalid>)
>> >>> escribió:
>> >>>
>> >>>> If I understand the scenario correctly, I don't think that's a
>> >> bug.  XML
>> >>>> characters are translated into UTF-8 characters which are then
>> >> parsed.  The
>> >>>> MXML Compiler is scanning all values for binding expressions.
>> >>>>
>> >>>> It would be a bug if there is no way to escape {} in a value so
>> >> that it
>> >>>> isn't seen as a binding expression.  I honestly don't know if there
>> >> is a
>> >>>> way or not.  I would check Flex documentation and use the Flex
>> >> compiler to
>> >>>> see if you can get {} to show up in a Flex label, then try the same
>> >> syntax
>> >>>> in Royale.
>> >>>>
>> >>>> My 2 cents,
>> >>>> -Alex
>> >>>>
>> >>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>> >>>>
>> >>>>   I have the following markup:
>> >>>>
>> >>>>   <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>> >>>> size="4" style="white-space:break-spaces;”/>
>> >>>>
>> >>>>   I’m trying to display markup in the text property of a component.
>> >>>>
>> >>>>   It shoould be displayed as:
>> >>>>   <sp:AssetList dataProvider="{provider}”/>
>> >>>>
>> >>>>   But it’s displayed as:
>> >>>>   <sp:AssetList dataProvider="[object Object],[object
>> >> Object],[object
>> >>>> Object]”/>
>> >>>>
>> >>>>   It looks to me like the Royale compiler is evaluating the
>> >> brackets in
>> >>>> the text.
>> >>>>
>> >>>>   FWIW, I also tried:
>> >>>>   <sp:Code text='&lt;sp:AssetList
>> >>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>> >>>> style="white-space:break-spaces;"/>
>> >>>>
>> >>>>   and got the same result.
>> >>>>
>> >>>>   I think this is a bug. Thoughts?
>> >>>>
>> >>>>   Harbs
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> Carlos Rovira
>> >>>
>> >>
>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
>> >>
>> >>
>> >>
>> >>
>>
>>

Re: Evaluating brackets

Posted by Greg Dove <gr...@gmail.com>.
I tried it yesterday, yes. I did not doublecheck that this morning though


On Wed, Jan 15, 2020 at 9:16 AM Harbs <ha...@gmail.com> wrote:

> Have you confirmed that the escape sequence which works in Flex doesn’t in
> Royale?
>
> > On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
> >
> > The escape sequence for binding that works in Flex, is single backslash.
> > I just quickly tested this now with <s:Label text="\{entry\}"  />
> >
> > where entry was also defined locally as a [Bindable] in script block.
> > That works.
> >
> > 'I think this is rare enough that we have bigger fish to fry even if it
> is
> > a bug.'
> > I agree. I suggest we log this as an issue and put it on backlog.
> >
> >
> > On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <ah...@adobe.com.invalid>
> wrote:
> >
> >> IMO, the second example may not be escaped as we don't know the escape
> >> sequence for binding.  You have used an XML entity instead of the brace,
> >> but I think that immediately gets evaluated into the brace UTF-8
> character
> >> before parsing.  These entities are required for compliant XML, but
> don't
> >> mark the characters for the parsing phase.  It is similar to trying to
> >> inject "\n" into strings in Java and other languages.  The escape
> sequence
> >> might be \{ or {{ or something else, I don't know.  Or there isn't a
> >> sequence and we need to invent one.
> >>
> >> Of course, I could be wrong...
> >> -Alex
> >>
> >> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
> >>
> >>    It was escaped in the second example.
> >>
> >>    I think this is rare enough that we have bigger fish to fry even if
> it
> >> is a bug.
> >>
> >>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org>
> >> wrote:
> >>>
> >>> I don't think is a bug too.
> >>> If you want to translate to plain text you must escape it, or better
> >> make
> >>> whole in a var in AS3 and display the value.
> >>>
> >>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
> >> (<ah...@adobe.com.invalid>)
> >>> escribió:
> >>>
> >>>> If I understand the scenario correctly, I don't think that's a
> >> bug.  XML
> >>>> characters are translated into UTF-8 characters which are then
> >> parsed.  The
> >>>> MXML Compiler is scanning all values for binding expressions.
> >>>>
> >>>> It would be a bug if there is no way to escape {} in a value so
> >> that it
> >>>> isn't seen as a binding expression.  I honestly don't know if there
> >> is a
> >>>> way or not.  I would check Flex documentation and use the Flex
> >> compiler to
> >>>> see if you can get {} to show up in a Flex label, then try the same
> >> syntax
> >>>> in Royale.
> >>>>
> >>>> My 2 cents,
> >>>> -Alex
> >>>>
> >>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
> >>>>
> >>>>   I have the following markup:
> >>>>
> >>>>   <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
> >>>> size="4" style="white-space:break-spaces;”/>
> >>>>
> >>>>   I’m trying to display markup in the text property of a component.
> >>>>
> >>>>   It shoould be displayed as:
> >>>>   <sp:AssetList dataProvider="{provider}”/>
> >>>>
> >>>>   But it’s displayed as:
> >>>>   <sp:AssetList dataProvider="[object Object],[object
> >> Object],[object
> >>>> Object]”/>
> >>>>
> >>>>   It looks to me like the Royale compiler is evaluating the
> >> brackets in
> >>>> the text.
> >>>>
> >>>>   FWIW, I also tried:
> >>>>   <sp:Code text='&lt;sp:AssetList
> >>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
> >>>> style="white-space:break-spaces;"/>
> >>>>
> >>>>   and got the same result.
> >>>>
> >>>>   I think this is a bug. Thoughts?
> >>>>
> >>>>   Harbs
> >>>>
> >>>>
> >>>
> >>> --
> >>> Carlos Rovira
> >>>
> >>
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
> >>
> >>
> >>
> >>
>
>

Re: Evaluating brackets

Posted by Harbs <ha...@gmail.com>.
Have you confirmed that the escape sequence which works in Flex doesn’t in Royale?

> On Jan 14, 2020, at 10:14 PM, Greg Dove <gr...@gmail.com> wrote:
> 
> The escape sequence for binding that works in Flex, is single backslash.
> I just quickly tested this now with <s:Label text="\{entry\}"  />
> 
> where entry was also defined locally as a [Bindable] in script block.
> That works.
> 
> 'I think this is rare enough that we have bigger fish to fry even if it is
> a bug.'
> I agree. I suggest we log this as an issue and put it on backlog.
> 
> 
> On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <ah...@adobe.com.invalid> wrote:
> 
>> IMO, the second example may not be escaped as we don't know the escape
>> sequence for binding.  You have used an XML entity instead of the brace,
>> but I think that immediately gets evaluated into the brace UTF-8 character
>> before parsing.  These entities are required for compliant XML, but don't
>> mark the characters for the parsing phase.  It is similar to trying to
>> inject "\n" into strings in Java and other languages.  The escape sequence
>> might be \{ or {{ or something else, I don't know.  Or there isn't a
>> sequence and we need to invent one.
>> 
>> Of course, I could be wrong...
>> -Alex
>> 
>> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>    It was escaped in the second example.
>> 
>>    I think this is rare enough that we have bigger fish to fry even if it
>> is a bug.
>> 
>>> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org>
>> wrote:
>>> 
>>> I don't think is a bug too.
>>> If you want to translate to plain text you must escape it, or better
>> make
>>> whole in a var in AS3 and display the value.
>>> 
>>> El lun., 13 ene. 2020 a las 18:46, Alex Harui
>> (<ah...@adobe.com.invalid>)
>>> escribió:
>>> 
>>>> If I understand the scenario correctly, I don't think that's a
>> bug.  XML
>>>> characters are translated into UTF-8 characters which are then
>> parsed.  The
>>>> MXML Compiler is scanning all values for binding expressions.
>>>> 
>>>> It would be a bug if there is no way to escape {} in a value so
>> that it
>>>> isn't seen as a binding expression.  I honestly don't know if there
>> is a
>>>> way or not.  I would check Flex documentation and use the Flex
>> compiler to
>>>> see if you can get {} to show up in a Flex label, then try the same
>> syntax
>>>> in Royale.
>>>> 
>>>> My 2 cents,
>>>> -Alex
>>>> 
>>>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>   I have the following markup:
>>>> 
>>>>   <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>>>> size="4" style="white-space:break-spaces;”/>
>>>> 
>>>>   I’m trying to display markup in the text property of a component.
>>>> 
>>>>   It shoould be displayed as:
>>>>   <sp:AssetList dataProvider="{provider}”/>
>>>> 
>>>>   But it’s displayed as:
>>>>   <sp:AssetList dataProvider="[object Object],[object
>> Object],[object
>>>> Object]”/>
>>>> 
>>>>   It looks to me like the Royale compiler is evaluating the
>> brackets in
>>>> the text.
>>>> 
>>>>   FWIW, I also tried:
>>>>   <sp:Code text='&lt;sp:AssetList
>>>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>>>> style="white-space:break-spaces;"/>
>>>> 
>>>>   and got the same result.
>>>> 
>>>>   I think this is a bug. Thoughts?
>>>> 
>>>>   Harbs
>>>> 
>>>> 
>>> 
>>> --
>>> Carlos Rovira
>>> 
>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
>> 
>> 
>> 
>> 


Re: Evaluating brackets

Posted by Greg Dove <gr...@gmail.com>.
The escape sequence for binding that works in Flex, is single backslash.
I just quickly tested this now with <s:Label text="\{entry\}"  />

where entry was also defined locally as a [Bindable] in script block.
That works.

'I think this is rare enough that we have bigger fish to fry even if it is
a bug.'
I agree. I suggest we log this as an issue and put it on backlog.


On Wed, Jan 15, 2020 at 5:12 AM Alex Harui <ah...@adobe.com.invalid> wrote:

> IMO, the second example may not be escaped as we don't know the escape
> sequence for binding.  You have used an XML entity instead of the brace,
> but I think that immediately gets evaluated into the brace UTF-8 character
> before parsing.  These entities are required for compliant XML, but don't
> mark the characters for the parsing phase.  It is similar to trying to
> inject "\n" into strings in Java and other languages.  The escape sequence
> might be \{ or {{ or something else, I don't know.  Or there isn't a
> sequence and we need to invent one.
>
> Of course, I could be wrong...
> -Alex
>
> On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:
>
>     It was escaped in the second example.
>
>     I think this is rare enough that we have bigger fish to fry even if it
> is a bug.
>
>     > On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org>
> wrote:
>     >
>     > I don't think is a bug too.
>     > If you want to translate to plain text you must escape it, or better
> make
>     > whole in a var in AS3 and display the value.
>     >
>     > El lun., 13 ene. 2020 a las 18:46, Alex Harui
> (<ah...@adobe.com.invalid>)
>     > escribió:
>     >
>     >> If I understand the scenario correctly, I don't think that's a
> bug.  XML
>     >> characters are translated into UTF-8 characters which are then
> parsed.  The
>     >> MXML Compiler is scanning all values for binding expressions.
>     >>
>     >> It would be a bug if there is no way to escape {} in a value so
> that it
>     >> isn't seen as a binding expression.  I honestly don't know if there
> is a
>     >> way or not.  I would check Flex documentation and use the Flex
> compiler to
>     >> see if you can get {} to show up in a Flex label, then try the same
> syntax
>     >> in Royale.
>     >>
>     >> My 2 cents,
>     >> -Alex
>     >>
>     >> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>     >>
>     >>    I have the following markup:
>     >>
>     >>    <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>     >> size="4" style="white-space:break-spaces;”/>
>     >>
>     >>    I’m trying to display markup in the text property of a component.
>     >>
>     >>    It shoould be displayed as:
>     >>    <sp:AssetList dataProvider="{provider}”/>
>     >>
>     >>    But it’s displayed as:
>     >>    <sp:AssetList dataProvider="[object Object],[object
> Object],[object
>     >> Object]”/>
>     >>
>     >>    It looks to me like the Royale compiler is evaluating the
> brackets in
>     >> the text.
>     >>
>     >>    FWIW, I also tried:
>     >>    <sp:Code text='&lt;sp:AssetList
>     >> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>     >> style="white-space:break-spaces;"/>
>     >>
>     >>    and got the same result.
>     >>
>     >>    I think this is a bug. Thoughts?
>     >>
>     >>    Harbs
>     >>
>     >>
>     >
>     > --
>     > Carlos Rovira
>     >
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
>
>
>
>

Re: Evaluating brackets

Posted by Alex Harui <ah...@adobe.com.INVALID>.
IMO, the second example may not be escaped as we don't know the escape sequence for binding.  You have used an XML entity instead of the brace, but I think that immediately gets evaluated into the brace UTF-8 character before parsing.  These entities are required for compliant XML, but don't mark the characters for the parsing phase.  It is similar to trying to inject "\n" into strings in Java and other languages.  The escape sequence might be \{ or {{ or something else, I don't know.  Or there isn't a sequence and we need to invent one.

Of course, I could be wrong...
-Alex

On 1/14/20, 12:14 AM, "Harbs" <ha...@gmail.com> wrote:

    It was escaped in the second example.
    
    I think this is rare enough that we have bigger fish to fry even if it is a bug.
    
    > On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org> wrote:
    > 
    > I don't think is a bug too.
    > If you want to translate to plain text you must escape it, or better make
    > whole in a var in AS3 and display the value.
    > 
    > El lun., 13 ene. 2020 a las 18:46, Alex Harui (<ah...@adobe.com.invalid>)
    > escribió:
    > 
    >> If I understand the scenario correctly, I don't think that's a bug.  XML
    >> characters are translated into UTF-8 characters which are then parsed.  The
    >> MXML Compiler is scanning all values for binding expressions.
    >> 
    >> It would be a bug if there is no way to escape {} in a value so that it
    >> isn't seen as a binding expression.  I honestly don't know if there is a
    >> way or not.  I would check Flex documentation and use the Flex compiler to
    >> see if you can get {} to show up in a Flex label, then try the same syntax
    >> in Royale.
    >> 
    >> My 2 cents,
    >> -Alex
    >> 
    >> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
    >> 
    >>    I have the following markup:
    >> 
    >>    <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
    >> size="4" style="white-space:break-spaces;”/>
    >> 
    >>    I’m trying to display markup in the text property of a component.
    >> 
    >>    It shoould be displayed as:
    >>    <sp:AssetList dataProvider="{provider}”/>
    >> 
    >>    But it’s displayed as:
    >>    <sp:AssetList dataProvider="[object Object],[object Object],[object
    >> Object]”/>
    >> 
    >>    It looks to me like the Royale compiler is evaluating the brackets in
    >> the text.
    >> 
    >>    FWIW, I also tried:
    >>    <sp:Code text='&lt;sp:AssetList
    >> dataProvider="&#123;provider&#125;"/&gt;' size="4"
    >> style="white-space:break-spaces;"/>
    >> 
    >>    and got the same result.
    >> 
    >>    I think this is a bug. Thoughts?
    >> 
    >>    Harbs
    >> 
    >> 
    > 
    > -- 
    > Carlos Rovira
    > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cc447c93171474ffcbae508d798c9d493%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637145864937648604&amp;sdata=tXrDPg8iJjaoncPWObTgHV2D9jPKslvPYzNrsP71xIU%3D&amp;reserved=0
    
    


Re: Evaluating brackets

Posted by Carlos Rovira <ca...@apache.org>.
Hi,

what's clear is that sometimes trying to do this kind of things in mxml is
difficult, and I remember experimenting a lot in Flex doing things like
that. As well thinking in adding more texts and other things in MXML for
TDJ and sometimes is not easy or we can do it. As you notice is the long
tail of difficult things that not all users will do, but will need to get
over there at some point.

Re: Evaluating brackets

Posted by Harbs <ha...@gmail.com>.
It was escaped in the second example.

I think this is rare enough that we have bigger fish to fry even if it is a bug.

> On Jan 14, 2020, at 9:26 AM, Carlos Rovira <ca...@apache.org> wrote:
> 
> I don't think is a bug too.
> If you want to translate to plain text you must escape it, or better make
> whole in a var in AS3 and display the value.
> 
> El lun., 13 ene. 2020 a las 18:46, Alex Harui (<ah...@adobe.com.invalid>)
> escribió:
> 
>> If I understand the scenario correctly, I don't think that's a bug.  XML
>> characters are translated into UTF-8 characters which are then parsed.  The
>> MXML Compiler is scanning all values for binding expressions.
>> 
>> It would be a bug if there is no way to escape {} in a value so that it
>> isn't seen as a binding expression.  I honestly don't know if there is a
>> way or not.  I would check Flex documentation and use the Flex compiler to
>> see if you can get {} to show up in a Flex label, then try the same syntax
>> in Royale.
>> 
>> My 2 cents,
>> -Alex
>> 
>> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>    I have the following markup:
>> 
>>    <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
>> size="4" style="white-space:break-spaces;”/>
>> 
>>    I’m trying to display markup in the text property of a component.
>> 
>>    It shoould be displayed as:
>>    <sp:AssetList dataProvider="{provider}”/>
>> 
>>    But it’s displayed as:
>>    <sp:AssetList dataProvider="[object Object],[object Object],[object
>> Object]”/>
>> 
>>    It looks to me like the Royale compiler is evaluating the brackets in
>> the text.
>> 
>>    FWIW, I also tried:
>>    <sp:Code text='&lt;sp:AssetList
>> dataProvider="&#123;provider&#125;"/&gt;' size="4"
>> style="white-space:break-spaces;"/>
>> 
>>    and got the same result.
>> 
>>    I think this is a bug. Thoughts?
>> 
>>    Harbs
>> 
>> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira


Re: Evaluating brackets

Posted by Carlos Rovira <ca...@apache.org>.
I don't think is a bug too.
If you want to translate to plain text you must escape it, or better make
whole in a var in AS3 and display the value.

El lun., 13 ene. 2020 a las 18:46, Alex Harui (<ah...@adobe.com.invalid>)
escribió:

> If I understand the scenario correctly, I don't think that's a bug.  XML
> characters are translated into UTF-8 characters which are then parsed.  The
> MXML Compiler is scanning all values for binding expressions.
>
> It would be a bug if there is no way to escape {} in a value so that it
> isn't seen as a binding expression.  I honestly don't know if there is a
> way or not.  I would check Flex documentation and use the Flex compiler to
> see if you can get {} to show up in a Flex label, then try the same syntax
> in Royale.
>
> My 2 cents,
> -Alex
>
> On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:
>
>     I have the following markup:
>
>     <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;'
> size="4" style="white-space:break-spaces;”/>
>
>     I’m trying to display markup in the text property of a component.
>
>     It shoould be displayed as:
>     <sp:AssetList dataProvider="{provider}”/>
>
>     But it’s displayed as:
>     <sp:AssetList dataProvider="[object Object],[object Object],[object
> Object]”/>
>
>     It looks to me like the Royale compiler is evaluating the brackets in
> the text.
>
>     FWIW, I also tried:
>     <sp:Code text='&lt;sp:AssetList
> dataProvider="&#123;provider&#125;"/&gt;' size="4"
> style="white-space:break-spaces;"/>
>
>     and got the same result.
>
>     I think this is a bug. Thoughts?
>
>     Harbs
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Evaluating brackets

Posted by Alex Harui <ah...@adobe.com.INVALID>.
If I understand the scenario correctly, I don't think that's a bug.  XML characters are translated into UTF-8 characters which are then parsed.  The MXML Compiler is scanning all values for binding expressions.

It would be a bug if there is no way to escape {} in a value so that it isn't seen as a binding expression.  I honestly don't know if there is a way or not.  I would check Flex documentation and use the Flex compiler to see if you can get {} to show up in a Flex label, then try the same syntax in Royale.

My 2 cents,
-Alex

On 1/13/20, 4:31 AM, "Harbs" <ha...@gmail.com> wrote:

    I have the following markup:
    
    <sp:Code text='&lt;sp:AssetList dataProvider="{provider}"/&gt;' size="4" style="white-space:break-spaces;”/>
    
    I’m trying to display markup in the text property of a component.
    
    It shoould be displayed as:
    <sp:AssetList dataProvider="{provider}”/>
    
    But it’s displayed as:
    <sp:AssetList dataProvider="[object Object],[object Object],[object Object]”/>
    
    It looks to me like the Royale compiler is evaluating the brackets in the text.
    
    FWIW, I also tried:
    <sp:Code text='&lt;sp:AssetList dataProvider="&#123;provider&#125;"/&gt;' size="4" style="white-space:break-spaces;"/>
    
    and got the same result.
    
    I think this is a bug. Thoughts?
    
    Harbs