Good morning all.
I am new to Apache Royale and I don't know how to make binding work
I have my main program which call some screens (ecrans.*)
each screen has its applicationScript where I define some constant that I
would link to bind to the view, it compiles, but the binding doesn't work
and shows undefine value.
I tried with differetn combination of
<j:beads>
<js:nnnnDataBinding/>
</j:beads>
but without success.
Can someone tell we what I am doing wrong?
Thanks
Nicolas
Here is a non working extract of my code
----- Main ----
<?xml version="1.0" encoding="utf-8"?>
<j:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:ecrans="ecrans.*"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:html="library://ns.apache.org/royale/html"
width="100%"
height="100%">
<j:beads>
<js:ApplicationDataBinding/>
</j:beads>
<j:initialView>
<j:View id="vuePrincipale" width="100%" height="100%">
<j:View id="EcranBox" width="100%" height="100%">
<ecrans:Ecran1 id="Ecran1" />
</j:View>
</j:View>
</j:initialView>
</j:Application>
----- Scren 1 .mxml ------
<?xml version="1.0" encoding="utf-8"?>
<ecrans:Ecran1Class
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:ecrans = "ecrans.*"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:html="library://ns.apache.org/royale/html"
xmlns:js="library://ns.apache.org/royale/basic"
>
<j:Form width="100%" height="100%" id="searchForm" >
<j:FormItem id="labelNom" label="nom :" width="100%" >
<j:TextInput id="nom" >
<j:beads>
<j:MaxNumberCharacters maxlength="{MAX_CHARS_NOM}" />
</j:beads>
</j:TextInput>
</j:FormItem>
</j:Form>
</ecrans:Ecran1Class>
----- screen 1 .as --------
package ecrans
{
import org.apache.royale.jewel.View;
public class Ecran1Class extends View
{
// Proprietes
[Bindable] public static const MAX_CHARS_NOM:int = 50;
// Constructeur
public function Ecran1Class()
{
super();
}
}