3

Lately i discovered MATE (for Flex development) and was wondering: how do i bind a property in a view (actually a navigatorcontent component) to another property in a class so that they stay in synchronization (meaning that whenever the property in the class changes the property in the view also changes).

So if we have a view called Target.mxml and a property targertProp how do we bind it to the class called SourceClass with property SourceProp?

Thanks in advance

Savvas Sopiadis
  • 8,213
  • 10
  • 34
  • 53

3 Answers3

1

For future use: fiction has answered the question correctly.

Actually it should have been formulated this way!

Community
  • 1
  • 1
Savvas Sopiadis
  • 8,213
  • 10
  • 34
  • 53
0
<Injectors target="{Target}">
   <PropertyInjector targetKey="targertProp" 
                     source="{SourceClass}"
                     sourceKey="SourceProp"/>
</Injectors>

Of course SourceProp must be [Bindable]

Kiril Kirilov
  • 11,167
  • 5
  • 49
  • 74
  • Yeah! fiction you 're right! This answers the question (which i should have formulated completely different, have a look here http://stackoverflow.com/questions/4644379/reflect-property-change-from-one-view-into-another-view-using-a-class-as-intermed) – Savvas Sopiadis Jan 10 '11 at 07:10
0

Read my article below

http://vinothbabu.com/2010/03/21/introduction-to-mate-framework/

on how you use the Injectors Tag to play with. Its a very simple example. Let me if you were looking for something else.

Thalaivar
  • 23,282
  • 5
  • 60
  • 71
  • Could you please have a look at http://stackoverflow.com/questions/4644379/reflect-property-change-from-one-view-into-another-view-using-a-class-as-intermed? – Savvas Sopiadis Jan 10 '11 at 07:13