You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OK <po...@olafkrueger.net> on 2016/10/04 12:17:01 UTC

[FlexJS][0.8.0] Binding issue on swf side

Hi,
regarding data binding Alex and Greg said some things were changed and will
change with 0.8.0 and so sometimes I stumbled over some issues with data
binding.
Probably there're not so many issues anymore with 0.8.0 but my less
knowledge of FlexJS paired with different issues on different 'SDK' versions
and different outputs (swf/js) is a bit confusing for me  ;-)

The latest issue I noticed is that the binding of a simple VO class does not
work on the swf side if the object is poplated at initComplete or
applicationComplete [1].

So the question is if you already know about most of the issues with binding
and have it in mind so it would be waste of time to post it here or creating
a JIRA and instead I should wait until you've made some progress with 0.8.0.

Thanks,
Olaf

[1]
<<js:Container xmlns:fx="http://ns.adobe.com/mxml/2009"
		 xmlns:js="library://ns.apache.org/flexjs/basic"
		 initComplete="onInitComplete()">

	<<fx:Script>
		
	</fx:Script>
	
	<js:beads>
		<js:ContainerDataBinding />
		<js:VerticalLayout />
	</js:beads>
        
	<js:Label text="{justAString}" />
        
	<js:Label text="{testVO.item}" />
        
        <js:Label text="{testVO2.item}" />
</js:Container>


[Bindable]
public class TestVO
{
	public function TestVO(item) {
		this.item = item;
	}
		
	public var item:String;
}



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-tp55563.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by OK <po...@olafkrueger.net>.
Alex Harui wrote
> Update:  The compiler isn't assigning private access getters to the
> Watchers, but it is assigning it to the Bindings, so I made changes to the
> Binding code in FlexJS to deal with it and things seem to be working.

Thanks Alex, I'll test it soon!

Olaf



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-tp55563p55613.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by Alex Harui <ah...@adobe.com>.
Update:  The compiler isn't assigning private access getters to the
Watchers, but it is assigning it to the Bindings, so I made changes to the
Binding code in FlexJS to deal with it and things seem to be working.
Maybe we will find a reason to put the getters on the Watchers some day.

Any volunteers to refactor the binding classes onto a base class with
subclasses?  There is lots of shared/duplicate code in each of the binding
implementations.

Thanks,
-Alex

On 10/4/16, 4:14 PM, "Alex Harui" <ah...@adobe.com> wrote:

>
>
>On 10/4/16, 2:03 PM, "OK" <po...@olafkrueger.net> wrote:
>
>>Hi Greg,
>>
>>
>>Greg Dove wrote
>>> I suspect it might work with ViewDataBinding but perhaps not the other
>>> Binding types yet.
>>
>>Hmmm, I've just tested it and it seems to me that's the same behaviour
>>with
>>ViewDataBinding:
>>Public works, private not.
>
>I'm looking into it.  The compiler is not doing the right thing...
>
>>
>>
>>Greg Dove wrote
>>> I can work on this by early next week if no-one else gets to it first.
>>
>>Would be great but please don't get me wrong:
>>I highly appreciate any effort but I don't expect it as a matter of
>>course.
>>I sometimes struggle with myself to post an issue or not cause it might
>>waste lots of people time if I'm doing soemthing wrong or if you guys
>>have
>>it on the list anyway.
>
>I don't know how often you decide not to post, but IMO, traffic isn't too
>high yet.  If you are doing something wrong, we need to identify that and
>document it at least in email because others will probably end up in the
>same hole.  The only list we have is what is in JIRA.  If it isn't in
>there, feel free to add your issue.
>
>New committers should make sure they are subscribed to
>issues@flex.apache.org since some JIRA traffic only goes there.  I'd like
>to establish a protocol where you only assign yourself an issue when you
>about to start working on it.  That way we can hopefully avoid duplication
>of effort.
>
>Thanks,
>-Alex
>


Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by Alex Harui <ah...@adobe.com>.

On 10/4/16, 2:03 PM, "OK" <po...@olafkrueger.net> wrote:

>Hi Greg,
>
>
>Greg Dove wrote
>> I suspect it might work with ViewDataBinding but perhaps not the other
>> Binding types yet.
>
>Hmmm, I've just tested it and it seems to me that's the same behaviour
>with
>ViewDataBinding:
>Public works, private not.

I'm looking into it.  The compiler is not doing the right thing...

>
>
>Greg Dove wrote
>> I can work on this by early next week if no-one else gets to it first.
>
>Would be great but please don't get me wrong:
>I highly appreciate any effort but I don't expect it as a matter of
>course.
>I sometimes struggle with myself to post an issue or not cause it might
>waste lots of people time if I'm doing soemthing wrong or if you guys have
>it on the list anyway.

I don't know how often you decide not to post, but IMO, traffic isn't too
high yet.  If you are doing something wrong, we need to identify that and
document it at least in email because others will probably end up in the
same hole.  The only list we have is what is in JIRA.  If it isn't in
there, feel free to add your issue.

New committers should make sure they are subscribed to
issues@flex.apache.org since some JIRA traffic only goes there.  I'd like
to establish a protocol where you only assign yourself an issue when you
about to start working on it.  That way we can hopefully avoid duplication
of effort.

Thanks,
-Alex


Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by OK <po...@olafkrueger.net>.
Hi Greg,


Greg Dove wrote
> I suspect it might work with ViewDataBinding but perhaps not the other
> Binding types yet.

Hmmm, I've just tested it and it seems to me that's the same behaviour with
ViewDataBinding:
Public works, private not.


Greg Dove wrote
> I can work on this by early next week if no-one else gets to it first.

Would be great but please don't get me wrong:
I highly appreciate any effort but I don't expect it as a matter of course.
I sometimes struggle with myself to post an issue or not cause it might
waste lots of people time if I'm doing soemthing wrong or if you guys have
it on the list anyway.

So, please enjoy your holiday ;-)

Thanks,
Olaf



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-tp55563p55580.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by Greg Dove <gr...@gmail.com>.
I suspect it might work with ViewDataBinding but perhaps not the other
Binding types yet. If so, it should be a relatively simple fix. I can work
on this by early next week if no-one else gets to it first.

-Greg
[sent from my phone]

On 5/10/2016 7:54 AM, "OK" <po...@olafkrueger.net> wrote:

> This is JIRA:
> https://issues.apache.org/jira/browse/FLEX-35137
>
> Thanks,
> Olaf
>
>
>
> --
> View this message in context: http://apache-flex-
> development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-
> tp55563p55575.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>

Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by OK <po...@olafkrueger.net>.
This is JIRA:
https://issues.apache.org/jira/browse/FLEX-35137

Thanks,
Olaf



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-tp55563p55575.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by OK <po...@olafkrueger.net>.
PKumar wrote
> Just try once  making your private variable to public. [Bindable] with
> Private variable is not working properly.

You're right, making it public works!

Many thanks!
Olaf




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-tp55563p55573.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS][0.8.0] Binding issue on swf side

Posted by PKumar <pr...@gmail.com>.
Just try once  making your private variable to public. [Bindable] with
Private variable is not working properly. 



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-0-8-0-Binding-issue-on-swf-side-tp55563p55571.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.