Hi Carlos,

correct .. I only had a setter ... 
Didn't know you need a both-ways accessor.

Chris

Am 22.09.20, 20:32 schrieb "Carlos Rovira" <[email protected]>:

    Hi,

    mmm...I think that should work. Maybe you don't have a getter too?

    and additional way is this (just for your info and other) from
    CruxQuickStart UserForm.mxml:

    public var user : User;

    //example of setter style binding Injection
    [Inject( source = "userController.currentUser", bind = "true" )]
    public function setUser(val:User):void{
    this.user = val;
    }

    El mar., 22 sept. 2020 a las 16:25, Christofer Dutz (<
    [email protected]>) escribió:

    > Hi all,
    >
    > I just stumbled into a problem where I couldn’t get Crux setter injection
    > to work.
    > In the end it turned out that in Crux the java-style setter is used for
    > crux in contrast to the action-script style
    >
    > So:
    >
    > [Inject]
    > public function set
    > mainApplicationModel(mainApplicationModel:MainApplicationModel):void {
    >
    > Didn’t work, but:
    >
    >
    > [Inject]
    > public function
    > setMainApplicationModel(mainApplicationModel:MainApplicationModel):void {
    >
    > Worked … I think it probably shouldn’t be too complicated to support both
    > styles?
    >
    > If I should shut up and stop posting stuff like this … tell me … I’m
    > currently sort of doing everything with an “observer-mode” keeping track 
of
    > things that confused me, dead ends and such.
    >
    > Chris
    >


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

Reply via email to