You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2018/03/17 22:26:15 UTC

Bindings with ITextModel

Hi,

in a MXMLViewBead I want to bind to components text property. Since the
components sets the text in the model I want to bind to model.text but
compiler says that property is not bindable. Some points:

- The file is a MXMLBeadView
- I have the appropriate binding bead MXMLBeadViewDataBinding set
- I want to do text="{ITextModel(model).text}"

The compiler complains.

TextModel has text and html properties not bindable, but I see other model
like in TitleBar that are bindable

- Why TextModel doesn't have binding ? (this use to be one the more used
models)

- Why don't use [Bindable("textChange"] in text and [Bindable("htmlChange"]
in html properties?

- If this is not the way to get "text" in the MXMLViewBead, how can I
retrieve it?

thanks

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

Re: Bindings with ITextModel

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Carlos,

Please add the [Bindable("textChange")] and [Bindable("htmlChange")].  I
think we just never needed to do that before.

Thanks,
-Alex

On 3/17/18, 3:26 PM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:

>Hi,
>
>in a MXMLViewBead I want to bind to components text property. Since the
>components sets the text in the model I want to bind to model.text but
>compiler says that property is not bindable. Some points:
>
>- The file is a MXMLBeadView
>- I have the appropriate binding bead MXMLBeadViewDataBinding set
>- I want to do text="{ITextModel(model).text}"
>
>The compiler complains.
>
>TextModel has text and html properties not bindable, but I see other model
>like in TitleBar that are bindable
>
>- Why TextModel doesn't have binding ? (this use to be one the more used
>models)
>
>- Why don't use [Bindable("textChange"] in text and
>[Bindable("htmlChange"]
>in html properties?
>
>- If this is not the way to get "text" in the MXMLViewBead, how can I
>retrieve it?
>
>thanks
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C235dbe3de9944483d60e08d5
>8c562ba2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636569224104970122&s
>data=VQM%2Femv8FSrTQrbWELTs6TfXqdbmvuNfS7cJsA%2FLL4s%3D&reserved=0