You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Christofer Dutz <ch...@c-ware.de> on 2020/09/22 14:25:05 UTC
Allowing Crux setter-injection the ActionScript style
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
Re: Allowing Crux setter-injection the ActionScript style
Posted by Carlos Rovira <ca...@apache.org>.
Hi,
I think so, please check if adding the other part make it work, if not we
need some fix there
thanks
El mar., 22 sept. 2020 a las 21:31, Christofer Dutz (<
christofer.dutz@c-ware.de>) escribió:
> 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" <ca...@apache.org>:
>
> 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 (<
> christofer.dutz@c-ware.de>) 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
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Allowing Crux setter-injection the ActionScript style
Posted by Christofer Dutz <ch...@c-ware.de>.
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" <ca...@apache.org>:
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 (<
christofer.dutz@c-ware.de>) 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
Re: Allowing Crux setter-injection the ActionScript style
Posted by Carlos Rovira <ca...@apache.org>.
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 (<
christofer.dutz@c-ware.de>) 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