You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Carlos Rovira <ca...@codeoscopic.com> on 2013/05/02 00:40:33 UTC
SimpleBinding changes make createjs sample stop working
Hi Alex
this latest change in SimpleBinding:
- this.source = this.document[this.sourceID];
+ this.source = this.document['get_' + this.sourceID]();
Makes the createjs sample to not generate controls far beyond a
SimpleBinding.
I need to change the sample code or it's a bug?
Thanks
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Alex Harui <ah...@adobe.com>.
Yup, refactoring an active code base is never fun. I'm about to shut it
down for tonight. I'll check back in about 7 hours.
On 5/3/13 10:42 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> I just woke up, I'll look at it after breakfast ;-)
>
> It looks to be a small change, but it's confusing to have to look at
> three sources (original, 'goog.events' and Carlos'), so I expect some
> errors to creep into the code after this merge. Shouldn't be too big
> of a deal to fix the ones we find, though.
>
> EdB
>
>
>
> On Sat, May 4, 2013 at 7:33 AM, Alex Harui <ah...@adobe.com> wrote:
>> Should hopefully be a small change. How is it going? Did you get the
>> publisher to work again?
>>
>>
>> On 5/3/13 10:23 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>>
>>> Thanks for waiting with this commit till after I land the
>>> 'goog.events' branch :-(
>>>
>>> EdB
>>>
>>>
>>>
>>> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
>>> <ca...@codeoscopic.com> wrote:
>>>> Hi Alex,
>>>>
>>>> fixed in my latest commit, not JS and SWF works ok. Things look better at
>>>> daylight ;).
>>>> Only JS side need to improve applicationModel to be getter/setter.
>>>>
>>>> I change SimpleBinding fix to try catch as you suggested.
>>>>
>>>> Best,
>>>>
>>>> Carlos
>>>>
>>>>
>>>> 2013/5/3 Alex Harui <ah...@adobe.com>
>>>>
>>>>> Hi Carlos,
>>>>>
>>>>> I don't think the change to ViewBase.as was correct. The applicationModel
>>>>> property should be a getter. It looks like you reverted to a var.
>>>>>
>>>>> See if that fixes the SWF situation.
>>>>>
>>>>> -Alex
>>>>>
>>>>> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>>>>
>>>>>> Alex,
>>>>>>
>>>>>> I shared a branch with some changes "feature/applicationModel_refactor".
>>>>>>
>>>>>> applicationModel is the variable that makes createjs sample fail with the
>>>>>> change in simplebinding. I refactor to the way you show (hopefuly).
>>>>>>
>>>>>> In the JS version all is working right. But now SWF compilations fails in
>>>>>> runtime for both, _again and createjs sample (in different ways).
>>>>>>
>>>>>> Could you take a look and see if this refactor is in the way you
>>>>>> commented?. I'll take a look tomorrow and see why SWFs are failing.
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>>>>>>
>>>>>>> Hi Alex,
>>>>>>>
>>>>>>> now I understand the problem. I was not aware of @expose and what you
>>>>>>> comment here. Very important information. Tomorrow I'll go back to the
>>>>>>> sample and see if I can change the sample to get working with that style
>>>>>>> and remove this fix since I think it's better to force people to make
>>>>>>> things in the good way.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>>>>
>>>>>>>> Hi Carlos,
>>>>>>>>
>>>>>>>> I saw the changes.
>>>>>>>>
>>>>>>>> I think it is a good fix, but you might want to add a comment that the
>>>>>>>> non-getter approach is likely to fail for non-public variables when
>>>>>>>> minified.
>>>>>>>>
>>>>>>>> Right now, binding in FlexJS only works for public properties and your
>>>>> fix
>>>>>>>> makes it work for public variables. Note that in some cases, the
>>>>> backing
>>>>>>>> variable for a public get/set is the same name because in JS the
>>>>> pattern
>>>>>>>> looks like:
>>>>>>>>
>>>>>>>> /** @private */
>>>>>>>> var foo;
>>>>>>>>
>>>>>>>> /** @expose */
>>>>>>>> function get_foo()
>>>>>>>> {
>>>>>>>> return this.foo;
>>>>>>>> }
>>>>>>>>
>>>>>>>> The question is, what did the AS look like? If it looked like
>>>>>>>>
>>>>>>>> private var _foo;
>>>>>>>> public function get foo()
>>>>>>>> {
>>>>>>>> return this._foo;
>>>>>>>> }
>>>>>>>>
>>>>>>>> Then the JS code for your failure case should be changed to look like
>>>>> the
>>>>>>>> recommended pattern and then you don't need the [this.sourceID] code
>>>>> path
>>>>>>>> as
>>>>>>>> there will be a get_ function.
>>>>>>>>
>>>>>>>> If the AS looked like:
>>>>>>>>
>>>>>>>> public var foo;
>>>>>>>>
>>>>>>>> Then the JS should be
>>>>>>>>
>>>>>>>> /** @expose */
>>>>>>>> Someclass.prototype.foo;
>>>>>>>>
>>>>>>>> If they forget to use @expose then it will likely fail when minified.
>>>>>>>>
>>>>>>>> One more minor thing: Do you happen to know if try/catch is more
>>>>>>>> efficient
>>>>>>>> than doing a property lookup to see if it is undefined before making a
>>>>>>>> call?
>>>>>>>>
>>>>>>>> Anyway, thanks for contributing. We can use all the help we can get.
>>>>>>>>
>>>>>>>>
>>>>>>>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Alex,
>>>>>>>>>
>>>>>>>>> I commit a solution that fixes the problem, but I don't know if is
>>>>>>>>> compliant with the motivation you make this change (minified version).
>>>>>>>>>
>>>>>>>>> I think binding should work even if we don't have a getter/setter
>>>>> setup,
>>>>>>>>> but I'm to new to this new framework that maybe this is not what you
>>>>>>>> have
>>>>>>>>> in mind.
>>>>>>>>>
>>>>>>>>> So it's up to you to change if you see some problem with this fix.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Alex
>>>>>>>>>>>
>>>>>>>>>>> this latest change in SimpleBinding:
>>>>>>>>>>>
>>>>>>>>>>> - this.source = this.document[this.sourceID];
>>>>>>>>>>> + this.source = this.document['get_' + this.sourceID]();
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Makes the createjs sample to not generate controls far beyond a
>>>>>>>>>>> SimpleBinding.
>>>>>>>>>>>
>>>>>>>>>>> I need to change the sample code or it's a bug?
>>>>>>>>>> Well, using getters is correct. Are you binding to something that
>>>>>>>> isn't a
>>>>>>>>>> getter in AS? Maybe the JS version of that property should have
>>>>> been a
>>>>>>>>>> get/set pair.
>>>>>>>>>>
>>>>>>>>>> But if you want, you can also try to make SimpleBinding tolerant and
>>>>>>>> find
>>>>>>>>>> things that aren't getters.
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Alex Harui
>>>>>>>>>> Flex SDK Team
>>>>>>>>>> Adobe Systems, Inc.
>>>>>>>>>> http://blogs.adobe.com/aharui
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Alex Harui
>>>>>>>> Flex SDK Team
>>>>>>>> Adobe Systems, Inc.
>>>>>>>> http://blogs.adobe.com/aharui
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Carlos Rovira
>>>>>>> Director de Tecnología
>>>>>>> M: +34 607 22 60 05
>>>>>>> F: +34 912 94 80 80
>>>>>>> http://www.codeoscopic.com
>>>>>>> http://www.directwriter.es
>>>>>>> http://www.avant2.es
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Alex Harui
>>>>> Flex SDK Team
>>>>> Adobe Systems, Inc.
>>>>> http://blogs.adobe.com/aharui
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Carlos Rovira
>>>> Director de Tecnología
>>>> M: +34 607 22 60 05
>>>> F: +34 912 94 80 80
>>>> http://www.codeoscopic.com
>>>> http://www.directwriter.es
>>>> http://www.avant2.es
>>>
>>>
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>
>
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
I just woke up, I'll look at it after breakfast ;-)
It looks to be a small change, but it's confusing to have to look at
three sources (original, 'goog.events' and Carlos'), so I expect some
errors to creep into the code after this merge. Shouldn't be too big
of a deal to fix the ones we find, though.
EdB
On Sat, May 4, 2013 at 7:33 AM, Alex Harui <ah...@adobe.com> wrote:
> Should hopefully be a small change. How is it going? Did you get the
> publisher to work again?
>
>
> On 5/3/13 10:23 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
>> Thanks for waiting with this commit till after I land the
>> 'goog.events' branch :-(
>>
>> EdB
>>
>>
>>
>> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
>> <ca...@codeoscopic.com> wrote:
>>> Hi Alex,
>>>
>>> fixed in my latest commit, not JS and SWF works ok. Things look better at
>>> daylight ;).
>>> Only JS side need to improve applicationModel to be getter/setter.
>>>
>>> I change SimpleBinding fix to try catch as you suggested.
>>>
>>> Best,
>>>
>>> Carlos
>>>
>>>
>>> 2013/5/3 Alex Harui <ah...@adobe.com>
>>>
>>>> Hi Carlos,
>>>>
>>>> I don't think the change to ViewBase.as was correct. The applicationModel
>>>> property should be a getter. It looks like you reverted to a var.
>>>>
>>>> See if that fixes the SWF situation.
>>>>
>>>> -Alex
>>>>
>>>> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>>>
>>>>> Alex,
>>>>>
>>>>> I shared a branch with some changes "feature/applicationModel_refactor".
>>>>>
>>>>> applicationModel is the variable that makes createjs sample fail with the
>>>>> change in simplebinding. I refactor to the way you show (hopefuly).
>>>>>
>>>>> In the JS version all is working right. But now SWF compilations fails in
>>>>> runtime for both, _again and createjs sample (in different ways).
>>>>>
>>>>> Could you take a look and see if this refactor is in the way you
>>>>> commented?. I'll take a look tomorrow and see why SWFs are failing.
>>>>>
>>>>>
>>>>>
>>>>> 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>>>>>
>>>>>> Hi Alex,
>>>>>>
>>>>>> now I understand the problem. I was not aware of @expose and what you
>>>>>> comment here. Very important information. Tomorrow I'll go back to the
>>>>>> sample and see if I can change the sample to get working with that style
>>>>>> and remove this fix since I think it's better to force people to make
>>>>>> things in the good way.
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>>>
>>>>>>> Hi Carlos,
>>>>>>>
>>>>>>> I saw the changes.
>>>>>>>
>>>>>>> I think it is a good fix, but you might want to add a comment that the
>>>>>>> non-getter approach is likely to fail for non-public variables when
>>>>>>> minified.
>>>>>>>
>>>>>>> Right now, binding in FlexJS only works for public properties and your
>>>> fix
>>>>>>> makes it work for public variables. Note that in some cases, the
>>>> backing
>>>>>>> variable for a public get/set is the same name because in JS the
>>>> pattern
>>>>>>> looks like:
>>>>>>>
>>>>>>> /** @private */
>>>>>>> var foo;
>>>>>>>
>>>>>>> /** @expose */
>>>>>>> function get_foo()
>>>>>>> {
>>>>>>> return this.foo;
>>>>>>> }
>>>>>>>
>>>>>>> The question is, what did the AS look like? If it looked like
>>>>>>>
>>>>>>> private var _foo;
>>>>>>> public function get foo()
>>>>>>> {
>>>>>>> return this._foo;
>>>>>>> }
>>>>>>>
>>>>>>> Then the JS code for your failure case should be changed to look like
>>>> the
>>>>>>> recommended pattern and then you don't need the [this.sourceID] code
>>>> path
>>>>>>> as
>>>>>>> there will be a get_ function.
>>>>>>>
>>>>>>> If the AS looked like:
>>>>>>>
>>>>>>> public var foo;
>>>>>>>
>>>>>>> Then the JS should be
>>>>>>>
>>>>>>> /** @expose */
>>>>>>> Someclass.prototype.foo;
>>>>>>>
>>>>>>> If they forget to use @expose then it will likely fail when minified.
>>>>>>>
>>>>>>> One more minor thing: Do you happen to know if try/catch is more
>>>>>>> efficient
>>>>>>> than doing a property lookup to see if it is undefined before making a
>>>>>>> call?
>>>>>>>
>>>>>>> Anyway, thanks for contributing. We can use all the help we can get.
>>>>>>>
>>>>>>>
>>>>>>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>>> wrote:
>>>>>>>
>>>>>>>> Hi Alex,
>>>>>>>>
>>>>>>>> I commit a solution that fixes the problem, but I don't know if is
>>>>>>>> compliant with the motivation you make this change (minified version).
>>>>>>>>
>>>>>>>> I think binding should work even if we don't have a getter/setter
>>>> setup,
>>>>>>>> but I'm to new to this new framework that maybe this is not what you
>>>>>>> have
>>>>>>>> in mind.
>>>>>>>>
>>>>>>>> So it's up to you to change if you see some problem with this fix.
>>>>>>>>
>>>>>>>>
>>>>>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Alex
>>>>>>>>>>
>>>>>>>>>> this latest change in SimpleBinding:
>>>>>>>>>>
>>>>>>>>>> - this.source = this.document[this.sourceID];
>>>>>>>>>> + this.source = this.document['get_' + this.sourceID]();
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Makes the createjs sample to not generate controls far beyond a
>>>>>>>>>> SimpleBinding.
>>>>>>>>>>
>>>>>>>>>> I need to change the sample code or it's a bug?
>>>>>>>>> Well, using getters is correct. Are you binding to something that
>>>>>>> isn't a
>>>>>>>>> getter in AS? Maybe the JS version of that property should have
>>>> been a
>>>>>>>>> get/set pair.
>>>>>>>>>
>>>>>>>>> But if you want, you can also try to make SimpleBinding tolerant and
>>>>>>> find
>>>>>>>>> things that aren't getters.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Alex Harui
>>>>>>>>> Flex SDK Team
>>>>>>>>> Adobe Systems, Inc.
>>>>>>>>> http://blogs.adobe.com/aharui
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Alex Harui
>>>>>>> Flex SDK Team
>>>>>>> Adobe Systems, Inc.
>>>>>>> http://blogs.adobe.com/aharui
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Carlos Rovira
>>>>>> Director de Tecnología
>>>>>> M: +34 607 22 60 05
>>>>>> F: +34 912 94 80 80
>>>>>> http://www.codeoscopic.com
>>>>>> http://www.directwriter.es
>>>>>> http://www.avant2.es
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Alex Harui
>>>> Flex SDK Team
>>>> Adobe Systems, Inc.
>>>> http://blogs.adobe.com/aharui
>>>>
>>>>
>>>
>>>
>>> --
>>> Carlos Rovira
>>> Director de Tecnología
>>> M: +34 607 22 60 05
>>> F: +34 912 94 80 80
>>> http://www.codeoscopic.com
>>> http://www.directwriter.es
>>> http://www.avant2.es
>>
>>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Erik,
I make a fix for html5 example project and uploaded to a branch. I will
wait for your integration, but please we can't stand in this collaboration
way since is not practical and we have the tools to prevent this blockages.
I feel if we could work some hours side by side in person to see this GIT
pitfalls you will see more clearly what I'm trying to tell you and we'll
don't have this kind of problems for a few commits. You should see merges
in our insurance Direct Writer product at Codeoscopic were we are merging
full branches that was separated 3 or 4 months ago...or upgrade of all
product to new platform version...imagine such crazy scenario. But GIT has
the tools and metodology to make this possible.
2013/5/4 Carlos Rovira <ca...@codeoscopic.com>
> Erik,
>
> sorry for the inconvenience, but GIT is just about not have to wait. Your
> mind are still in SVN and still does not switch to GIT.
>
> We at work are always merging and resolving conflicts in integration
> branches. We never merge directly in develop. For this kind of brutal
> changes you should:
>
> 1.- start an integration branch
> 2.- make merges in that brach (and maintain it over time what could be
> cumbersome as time and divergences happen)
> 3.- test that all is ok
> 4.- merge back into develop
>
> Erik, I know you are not yet a fan of GIT but think that the way that I'm
> propossing to you could never be done in SVN and most important, you don't
> stop other people works.
>
>
>
>
>
> 2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
>
>> Thanks for waiting with this commit till after I land the
>> 'goog.events' branch :-(
>>
>> EdB
>>
>>
>>
>> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
>> <ca...@codeoscopic.com> wrote:
>> > Hi Alex,
>> >
>> > fixed in my latest commit, not JS and SWF works ok. Things look better
>> at
>> > daylight ;).
>> > Only JS side need to improve applicationModel to be getter/setter.
>> >
>> > I change SimpleBinding fix to try catch as you suggested.
>> >
>> > Best,
>> >
>> > Carlos
>> >
>> >
>> > 2013/5/3 Alex Harui <ah...@adobe.com>
>> >
>> >> Hi Carlos,
>> >>
>> >> I don't think the change to ViewBase.as was correct. The
>> applicationModel
>> >> property should be a getter. It looks like you reverted to a var.
>> >>
>> >> See if that fixes the SWF situation.
>> >>
>> >> -Alex
>> >>
>> >> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> wrote:
>> >>
>> >> > Alex,
>> >> >
>> >> > I shared a branch with some changes
>> "feature/applicationModel_refactor".
>> >> >
>> >> > applicationModel is the variable that makes createjs sample fail
>> with the
>> >> > change in simplebinding. I refactor to the way you show (hopefuly).
>> >> >
>> >> > In the JS version all is working right. But now SWF compilations
>> fails in
>> >> > runtime for both, _again and createjs sample (in different ways).
>> >> >
>> >> > Could you take a look and see if this refactor is in the way you
>> >> > commented?. I'll take a look tomorrow and see why SWFs are failing.
>> >> >
>> >> >
>> >> >
>> >> > 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>> >> >
>> >> >> Hi Alex,
>> >> >>
>> >> >> now I understand the problem. I was not aware of @expose and what
>> you
>> >> >> comment here. Very important information. Tomorrow I'll go back to
>> the
>> >> >> sample and see if I can change the sample to get working with that
>> style
>> >> >> and remove this fix since I think it's better to force people to
>> make
>> >> >> things in the good way.
>> >> >>
>> >> >>
>> >> >>
>> >> >> 2013/5/2 Alex Harui <ah...@adobe.com>
>> >> >>
>> >> >>> Hi Carlos,
>> >> >>>
>> >> >>> I saw the changes.
>> >> >>>
>> >> >>> I think it is a good fix, but you might want to add a comment that
>> the
>> >> >>> non-getter approach is likely to fail for non-public variables when
>> >> >>> minified.
>> >> >>>
>> >> >>> Right now, binding in FlexJS only works for public properties and
>> your
>> >> fix
>> >> >>> makes it work for public variables. Note that in some cases, the
>> >> backing
>> >> >>> variable for a public get/set is the same name because in JS the
>> >> pattern
>> >> >>> looks like:
>> >> >>>
>> >> >>> /** @private */
>> >> >>> var foo;
>> >> >>>
>> >> >>> /** @expose */
>> >> >>> function get_foo()
>> >> >>> {
>> >> >>> return this.foo;
>> >> >>> }
>> >> >>>
>> >> >>> The question is, what did the AS look like? If it looked like
>> >> >>>
>> >> >>> private var _foo;
>> >> >>> public function get foo()
>> >> >>> {
>> >> >>> return this._foo;
>> >> >>> }
>> >> >>>
>> >> >>> Then the JS code for your failure case should be changed to look
>> like
>> >> the
>> >> >>> recommended pattern and then you don't need the [this.sourceID]
>> code
>> >> path
>> >> >>> as
>> >> >>> there will be a get_ function.
>> >> >>>
>> >> >>> If the AS looked like:
>> >> >>>
>> >> >>> public var foo;
>> >> >>>
>> >> >>> Then the JS should be
>> >> >>>
>> >> >>> /** @expose */
>> >> >>> Someclass.prototype.foo;
>> >> >>>
>> >> >>> If they forget to use @expose then it will likely fail when
>> minified.
>> >> >>>
>> >> >>> One more minor thing: Do you happen to know if try/catch is more
>> >> >>> efficient
>> >> >>> than doing a property lookup to see if it is undefined before
>> making a
>> >> >>> call?
>> >> >>>
>> >> >>> Anyway, thanks for contributing. We can use all the help we can
>> get.
>> >> >>>
>> >> >>>
>> >> >>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> >> wrote:
>> >> >>>
>> >> >>>> Hi Alex,
>> >> >>>>
>> >> >>>> I commit a solution that fixes the problem, but I don't know if is
>> >> >>>> compliant with the motivation you make this change (minified
>> version).
>> >> >>>>
>> >> >>>> I think binding should work even if we don't have a getter/setter
>> >> setup,
>> >> >>>> but I'm to new to this new framework that maybe this is not what
>> you
>> >> >>> have
>> >> >>>> in mind.
>> >> >>>>
>> >> >>>> So it's up to you to change if you see some problem with this fix.
>> >> >>>>
>> >> >>>>
>> >> >>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>> >> >>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <
>> carlos.rovira@codeoscopic.com>
>> >> >>> wrote:
>> >> >>>>>
>> >> >>>>>> Hi Alex
>> >> >>>>>>
>> >> >>>>>> this latest change in SimpleBinding:
>> >> >>>>>>
>> >> >>>>>> - this.source = this.document[this.sourceID];
>> >> >>>>>> + this.source = this.document['get_' + this.sourceID]();
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>> Makes the createjs sample to not generate controls far beyond a
>> >> >>>>>> SimpleBinding.
>> >> >>>>>>
>> >> >>>>>> I need to change the sample code or it's a bug?
>> >> >>>>> Well, using getters is correct. Are you binding to something
>> that
>> >> >>> isn't a
>> >> >>>>> getter in AS? Maybe the JS version of that property should have
>> >> been a
>> >> >>>>> get/set pair.
>> >> >>>>>
>> >> >>>>> But if you want, you can also try to make SimpleBinding tolerant
>> and
>> >> >>> find
>> >> >>>>> things that aren't getters.
>> >> >>>>>>
>> >> >>>>>> Thanks
>> >> >>>>>
>> >> >>>>> --
>> >> >>>>> Alex Harui
>> >> >>>>> Flex SDK Team
>> >> >>>>> Adobe Systems, Inc.
>> >> >>>>> http://blogs.adobe.com/aharui
>> >> >>>>>
>> >> >>>>>
>> >> >>>>
>> >> >>>
>> >> >>> --
>> >> >>> Alex Harui
>> >> >>> Flex SDK Team
>> >> >>> Adobe Systems, Inc.
>> >> >>> http://blogs.adobe.com/aharui
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Carlos Rovira
>> >> >> Director de Tecnología
>> >> >> M: +34 607 22 60 05
>> >> >> F: +34 912 94 80 80
>> >> >> http://www.codeoscopic.com
>> >> >> http://www.directwriter.es
>> >> >> http://www.avant2.es
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> Alex Harui
>> >> Flex SDK Team
>> >> Adobe Systems, Inc.
>> >> http://blogs.adobe.com/aharui
>> >>
>> >>
>> >
>> >
>> > --
>> > Carlos Rovira
>> > Director de Tecnología
>> > M: +34 607 22 60 05
>> > F: +34 912 94 80 80
>> > http://www.codeoscopic.com
>> > http://www.directwriter.es
>> > http://www.avant2.es
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
>
>
> --
> Carlos Rovira
> Director de Tecnología
> M: +34 607 22 60 05
> F: +34 912 94 80 80
> http://www.codeoscopic.com
> http://www.directwriter.es
> http://www.avant2.es
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Great! I'll connect later años see it.
Thanks Erik :)
El sábado, 4 de mayo de 2013, Erik de Bruin escribió:
> Branch... I'm mixing metafors, must be tired.
>
> EdB
>
>
>
> On Sat, May 4, 2013 at 8:18 PM, Erik de Bruin <erik@ixsoftware.nl<javascript:;>>
> wrote:
> > Carlos,
> >
> > Please re-read the thread and see who started the git vs. SVN. And
> > please stop thinking that just because I don't like git I must not
> > know git. I know git and I don't like it.
> >
> > Let's move on.
> >
> > I've pushed the merged thread.
> >
> > EdB
> >
> >
> >
> > On Sat, May 4, 2013 at 8:08 PM, Carlos Rovira
> > <carlos.rovira@codeoscopic.com <javascript:;>> wrote:
> >> Erik, since Apache Flex is on GIT...don't you think is time to stop
> mails
> >> about GIT or SVN? I left to respond mails about Git many months ago due
> to
> >> the fact that this project is about Flex...not about GIT. Many people in
> >> the list (and out of the list) criticized about high traffic in this
> list
> >> only to discuss about GIT.
> >>
> >> We're all here to contribute, collaborate and be as positive as
> possible.
> >> Please, try to close your bad entrance in the GIT world and try to learn
> >> more about the system so you end loving to work with.
> >>
> >> If you want I'd like you to offer to connect via screen sharing and help
> >> you to solve the problems you have. I'd like to see you one day saying
> "GIT
> >> is the best option that will ever happen to Apache Flex" ;).
> >>
> >> To end, taking into accoutn that this problem is due to resolve merge
> >> conflicts do you know about tools like DiffMerge (
> >> http://www.sourcegear.com/diffmerge/) or Kaleidoscope (
> >> http://www.kaleidoscopeapp.com). We use both tools at work every day to
> >> manage lots of complicated conflicts. This kind of tools are simply *a
> >> must* to resolve conflicts.
> >>
> >> Let me know if you want to accept my connect proposal and we could talk
> off
> >> list on how to do it.
> >>
> >> For me, this is my last mail about GIT in Apache Flex about its
> validity.
> >>
> >>
> >> 2013/5/4 Erik de Bruin <erik@ixsoftware.nl <javascript:;>>
> >>
> >>> Also, I like this: first you say:
> >>>
> >>> > We never merge directly in develop
> >>>
> >>> ... Then you say:
> >>>
> >>> > 4.- merge back into develop
> >>>
> >>> ;-)
> >>>
> >>> EdB
> >>>
> >>>
> >>>
> >>> --
> >>> Ix Multimedia Software
> >>>
> >>> Jan Luykenstraat 27
> >>> 3521 VB Utrecht
> >>>
> >>> T. 06-51952295
> >>> I. www.ixsoftware.nl
> >>>
> >>
> >>
> >>
> >> --
> >> Carlos Rovira
> >> Director de Tecnología
> >> M: +34 607 22 60 05
> >> F: +34 912 94 80 80
> >> http://www.codeoscopic.com
> >> http://www.directwriter.es
> >> http://www.avant2.es
> >
> >
> >
> > --
> > Ix Multimedia Software
> >
> > Jan Luykenstraat 27
> > 3521 VB Utrecht
> >
> > T. 06-51952295
> > I. www.ixsoftware.nl
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Branch... I'm mixing metafors, must be tired.
EdB
On Sat, May 4, 2013 at 8:18 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> Carlos,
>
> Please re-read the thread and see who started the git vs. SVN. And
> please stop thinking that just because I don't like git I must not
> know git. I know git and I don't like it.
>
> Let's move on.
>
> I've pushed the merged thread.
>
> EdB
>
>
>
> On Sat, May 4, 2013 at 8:08 PM, Carlos Rovira
> <ca...@codeoscopic.com> wrote:
>> Erik, since Apache Flex is on GIT...don't you think is time to stop mails
>> about GIT or SVN? I left to respond mails about Git many months ago due to
>> the fact that this project is about Flex...not about GIT. Many people in
>> the list (and out of the list) criticized about high traffic in this list
>> only to discuss about GIT.
>>
>> We're all here to contribute, collaborate and be as positive as possible.
>> Please, try to close your bad entrance in the GIT world and try to learn
>> more about the system so you end loving to work with.
>>
>> If you want I'd like you to offer to connect via screen sharing and help
>> you to solve the problems you have. I'd like to see you one day saying "GIT
>> is the best option that will ever happen to Apache Flex" ;).
>>
>> To end, taking into accoutn that this problem is due to resolve merge
>> conflicts do you know about tools like DiffMerge (
>> http://www.sourcegear.com/diffmerge/) or Kaleidoscope (
>> http://www.kaleidoscopeapp.com). We use both tools at work every day to
>> manage lots of complicated conflicts. This kind of tools are simply *a
>> must* to resolve conflicts.
>>
>> Let me know if you want to accept my connect proposal and we could talk off
>> list on how to do it.
>>
>> For me, this is my last mail about GIT in Apache Flex about its validity.
>>
>>
>> 2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
>>
>>> Also, I like this: first you say:
>>>
>>> > We never merge directly in develop
>>>
>>> ... Then you say:
>>>
>>> > 4.- merge back into develop
>>>
>>> ;-)
>>>
>>> EdB
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>>
>>
>> --
>> Carlos Rovira
>> Director de Tecnología
>> M: +34 607 22 60 05
>> F: +34 912 94 80 80
>> http://www.codeoscopic.com
>> http://www.directwriter.es
>> http://www.avant2.es
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Carlos,
Please re-read the thread and see who started the git vs. SVN. And
please stop thinking that just because I don't like git I must not
know git. I know git and I don't like it.
Let's move on.
I've pushed the merged thread.
EdB
On Sat, May 4, 2013 at 8:08 PM, Carlos Rovira
<ca...@codeoscopic.com> wrote:
> Erik, since Apache Flex is on GIT...don't you think is time to stop mails
> about GIT or SVN? I left to respond mails about Git many months ago due to
> the fact that this project is about Flex...not about GIT. Many people in
> the list (and out of the list) criticized about high traffic in this list
> only to discuss about GIT.
>
> We're all here to contribute, collaborate and be as positive as possible.
> Please, try to close your bad entrance in the GIT world and try to learn
> more about the system so you end loving to work with.
>
> If you want I'd like you to offer to connect via screen sharing and help
> you to solve the problems you have. I'd like to see you one day saying "GIT
> is the best option that will ever happen to Apache Flex" ;).
>
> To end, taking into accoutn that this problem is due to resolve merge
> conflicts do you know about tools like DiffMerge (
> http://www.sourcegear.com/diffmerge/) or Kaleidoscope (
> http://www.kaleidoscopeapp.com). We use both tools at work every day to
> manage lots of complicated conflicts. This kind of tools are simply *a
> must* to resolve conflicts.
>
> Let me know if you want to accept my connect proposal and we could talk off
> list on how to do it.
>
> For me, this is my last mail about GIT in Apache Flex about its validity.
>
>
> 2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
>
>> Also, I like this: first you say:
>>
>> > We never merge directly in develop
>>
>> ... Then you say:
>>
>> > 4.- merge back into develop
>>
>> ;-)
>>
>> EdB
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
>
>
> --
> Carlos Rovira
> Director de Tecnología
> M: +34 607 22 60 05
> F: +34 912 94 80 80
> http://www.codeoscopic.com
> http://www.directwriter.es
> http://www.avant2.es
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Erik, since Apache Flex is on GIT...don't you think is time to stop mails
about GIT or SVN? I left to respond mails about Git many months ago due to
the fact that this project is about Flex...not about GIT. Many people in
the list (and out of the list) criticized about high traffic in this list
only to discuss about GIT.
We're all here to contribute, collaborate and be as positive as possible.
Please, try to close your bad entrance in the GIT world and try to learn
more about the system so you end loving to work with.
If you want I'd like you to offer to connect via screen sharing and help
you to solve the problems you have. I'd like to see you one day saying "GIT
is the best option that will ever happen to Apache Flex" ;).
To end, taking into accoutn that this problem is due to resolve merge
conflicts do you know about tools like DiffMerge (
http://www.sourcegear.com/diffmerge/) or Kaleidoscope (
http://www.kaleidoscopeapp.com). We use both tools at work every day to
manage lots of complicated conflicts. This kind of tools are simply *a
must* to resolve conflicts.
Let me know if you want to accept my connect proposal and we could talk off
list on how to do it.
For me, this is my last mail about GIT in Apache Flex about its validity.
2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
> Also, I like this: first you say:
>
> > We never merge directly in develop
>
> ... Then you say:
>
> > 4.- merge back into develop
>
> ;-)
>
> EdB
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Also, I like this: first you say:
> We never merge directly in develop
... Then you say:
> 4.- merge back into develop
;-)
EdB
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Let me clarify:
Telling me I'm doing it wrong and then telling me to do exactly what I
was already doing is killing my will to contribute. I'm not asking to
hold commits because it's more convenient for me, I was asking to
commit what you had outstanding so I could integrate that. As a
service to you.
Since my commit is a major refactor of each and every file in the
FlexJS JS framework, every commit will be a conflict if it's based on
the 'old' code. I asked everyone to hold their contributions for a
short time to not confuse things. Since git is no better (and often
worse) than SVN at resolving merge conflicts (and please don't mention
the legendary "merge hell", that's a function of source control, not
SVN in particular), I was trying to make it as easy as I could for
everyone involved.
While we're on the subject: it's not as if git has brought anything
useful to this project, and it has cost us a dearly. We're still
nowhere near being able to do a release of the SDK, let alone having
automated builds or contributions of newbies. And it's been months
since the move... The hordes of contributors that would come to our
help and make this the best project ever are still successfully hiding
somewhere...
Keep telling me that git will be a miracle tool that will solve all
kinds of problems - which we didn't have - makes no sense anymore. And
telling me that I need to stick with it because I just don't get it,
and that it will grow on me is plain insulting, as I by now probably
know git better than most, just so I could keep contributing. I hate
this elitist "it's more complicated to use, so it's better and if you
don't get that you're not worthy". Sometimes more complicated just
means less useful. The fact that even the people who use git for a
living can't agree on the way to use it - which by the way cost us a
valued committer - is proof enough of that.
Thoroughly demotivated, in full drama queen mode,
EdB
On Sat, May 4, 2013 at 6:18 PM, Erik de Bruin <er...@ixsoftware.nl> wrote:
> Git is killing this project.
>
> EdB
>
>
>
> On Sat, May 4, 2013 at 10:36 AM, Carlos Rovira
> <ca...@codeoscopic.com> wrote:
>> Erik,
>>
>> sorry for the inconvenience, but GIT is just about not have to wait. Your
>> mind are still in SVN and still does not switch to GIT.
>>
>> We at work are always merging and resolving conflicts in integration
>> branches. We never merge directly in develop. For this kind of brutal
>> changes you should:
>>
>> 1.- start an integration branch
>> 2.- make merges in that brach (and maintain it over time what could be
>> cumbersome as time and divergences happen)
>> 3.- test that all is ok
>> 4.- merge back into develop
>>
>> Erik, I know you are not yet a fan of GIT but think that the way that I'm
>> propossing to you could never be done in SVN and most important, you don't
>> stop other people works.
>>
>>
>>
>>
>>
>> 2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
>>
>>> Thanks for waiting with this commit till after I land the
>>> 'goog.events' branch :-(
>>>
>>> EdB
>>>
>>>
>>>
>>> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
>>> <ca...@codeoscopic.com> wrote:
>>> > Hi Alex,
>>> >
>>> > fixed in my latest commit, not JS and SWF works ok. Things look better at
>>> > daylight ;).
>>> > Only JS side need to improve applicationModel to be getter/setter.
>>> >
>>> > I change SimpleBinding fix to try catch as you suggested.
>>> >
>>> > Best,
>>> >
>>> > Carlos
>>> >
>>> >
>>> > 2013/5/3 Alex Harui <ah...@adobe.com>
>>> >
>>> >> Hi Carlos,
>>> >>
>>> >> I don't think the change to ViewBase.as was correct. The
>>> applicationModel
>>> >> property should be a getter. It looks like you reverted to a var.
>>> >>
>>> >> See if that fixes the SWF situation.
>>> >>
>>> >> -Alex
>>> >>
>>> >> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>> wrote:
>>> >>
>>> >> > Alex,
>>> >> >
>>> >> > I shared a branch with some changes
>>> "feature/applicationModel_refactor".
>>> >> >
>>> >> > applicationModel is the variable that makes createjs sample fail with
>>> the
>>> >> > change in simplebinding. I refactor to the way you show (hopefuly).
>>> >> >
>>> >> > In the JS version all is working right. But now SWF compilations
>>> fails in
>>> >> > runtime for both, _again and createjs sample (in different ways).
>>> >> >
>>> >> > Could you take a look and see if this refactor is in the way you
>>> >> > commented?. I'll take a look tomorrow and see why SWFs are failing.
>>> >> >
>>> >> >
>>> >> >
>>> >> > 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>>> >> >
>>> >> >> Hi Alex,
>>> >> >>
>>> >> >> now I understand the problem. I was not aware of @expose and what you
>>> >> >> comment here. Very important information. Tomorrow I'll go back to
>>> the
>>> >> >> sample and see if I can change the sample to get working with that
>>> style
>>> >> >> and remove this fix since I think it's better to force people to make
>>> >> >> things in the good way.
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> 2013/5/2 Alex Harui <ah...@adobe.com>
>>> >> >>
>>> >> >>> Hi Carlos,
>>> >> >>>
>>> >> >>> I saw the changes.
>>> >> >>>
>>> >> >>> I think it is a good fix, but you might want to add a comment that
>>> the
>>> >> >>> non-getter approach is likely to fail for non-public variables when
>>> >> >>> minified.
>>> >> >>>
>>> >> >>> Right now, binding in FlexJS only works for public properties and
>>> your
>>> >> fix
>>> >> >>> makes it work for public variables. Note that in some cases, the
>>> >> backing
>>> >> >>> variable for a public get/set is the same name because in JS the
>>> >> pattern
>>> >> >>> looks like:
>>> >> >>>
>>> >> >>> /** @private */
>>> >> >>> var foo;
>>> >> >>>
>>> >> >>> /** @expose */
>>> >> >>> function get_foo()
>>> >> >>> {
>>> >> >>> return this.foo;
>>> >> >>> }
>>> >> >>>
>>> >> >>> The question is, what did the AS look like? If it looked like
>>> >> >>>
>>> >> >>> private var _foo;
>>> >> >>> public function get foo()
>>> >> >>> {
>>> >> >>> return this._foo;
>>> >> >>> }
>>> >> >>>
>>> >> >>> Then the JS code for your failure case should be changed to look
>>> like
>>> >> the
>>> >> >>> recommended pattern and then you don't need the [this.sourceID] code
>>> >> path
>>> >> >>> as
>>> >> >>> there will be a get_ function.
>>> >> >>>
>>> >> >>> If the AS looked like:
>>> >> >>>
>>> >> >>> public var foo;
>>> >> >>>
>>> >> >>> Then the JS should be
>>> >> >>>
>>> >> >>> /** @expose */
>>> >> >>> Someclass.prototype.foo;
>>> >> >>>
>>> >> >>> If they forget to use @expose then it will likely fail when
>>> minified.
>>> >> >>>
>>> >> >>> One more minor thing: Do you happen to know if try/catch is more
>>> >> >>> efficient
>>> >> >>> than doing a property lookup to see if it is undefined before
>>> making a
>>> >> >>> call?
>>> >> >>>
>>> >> >>> Anyway, thanks for contributing. We can use all the help we can
>>> get.
>>> >> >>>
>>> >> >>>
>>> >> >>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>> >> wrote:
>>> >> >>>
>>> >> >>>> Hi Alex,
>>> >> >>>>
>>> >> >>>> I commit a solution that fixes the problem, but I don't know if is
>>> >> >>>> compliant with the motivation you make this change (minified
>>> version).
>>> >> >>>>
>>> >> >>>> I think binding should work even if we don't have a getter/setter
>>> >> setup,
>>> >> >>>> but I'm to new to this new framework that maybe this is not what
>>> you
>>> >> >>> have
>>> >> >>>> in mind.
>>> >> >>>>
>>> >> >>>> So it's up to you to change if you see some problem with this fix.
>>> >> >>>>
>>> >> >>>>
>>> >> >>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>> >> >>>>
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <carlos.rovira@codeoscopic.com
>>> >
>>> >> >>> wrote:
>>> >> >>>>>
>>> >> >>>>>> Hi Alex
>>> >> >>>>>>
>>> >> >>>>>> this latest change in SimpleBinding:
>>> >> >>>>>>
>>> >> >>>>>> - this.source = this.document[this.sourceID];
>>> >> >>>>>> + this.source = this.document['get_' + this.sourceID]();
>>> >> >>>>>>
>>> >> >>>>>>
>>> >> >>>>>> Makes the createjs sample to not generate controls far beyond a
>>> >> >>>>>> SimpleBinding.
>>> >> >>>>>>
>>> >> >>>>>> I need to change the sample code or it's a bug?
>>> >> >>>>> Well, using getters is correct. Are you binding to something that
>>> >> >>> isn't a
>>> >> >>>>> getter in AS? Maybe the JS version of that property should have
>>> >> been a
>>> >> >>>>> get/set pair.
>>> >> >>>>>
>>> >> >>>>> But if you want, you can also try to make SimpleBinding tolerant
>>> and
>>> >> >>> find
>>> >> >>>>> things that aren't getters.
>>> >> >>>>>>
>>> >> >>>>>> Thanks
>>> >> >>>>>
>>> >> >>>>> --
>>> >> >>>>> Alex Harui
>>> >> >>>>> Flex SDK Team
>>> >> >>>>> Adobe Systems, Inc.
>>> >> >>>>> http://blogs.adobe.com/aharui
>>> >> >>>>>
>>> >> >>>>>
>>> >> >>>>
>>> >> >>>
>>> >> >>> --
>>> >> >>> Alex Harui
>>> >> >>> Flex SDK Team
>>> >> >>> Adobe Systems, Inc.
>>> >> >>> http://blogs.adobe.com/aharui
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> Carlos Rovira
>>> >> >> Director de Tecnología
>>> >> >> M: +34 607 22 60 05
>>> >> >> F: +34 912 94 80 80
>>> >> >> http://www.codeoscopic.com
>>> >> >> http://www.directwriter.es
>>> >> >> http://www.avant2.es
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >> --
>>> >> Alex Harui
>>> >> Flex SDK Team
>>> >> Adobe Systems, Inc.
>>> >> http://blogs.adobe.com/aharui
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Carlos Rovira
>>> > Director de Tecnología
>>> > M: +34 607 22 60 05
>>> > F: +34 912 94 80 80
>>> > http://www.codeoscopic.com
>>> > http://www.directwriter.es
>>> > http://www.avant2.es
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>>
>>
>> --
>> Carlos Rovira
>> Director de Tecnología
>> M: +34 607 22 60 05
>> F: +34 912 94 80 80
>> http://www.codeoscopic.com
>> http://www.directwriter.es
>> http://www.avant2.es
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Git is killing this project.
EdB
On Sat, May 4, 2013 at 10:36 AM, Carlos Rovira
<ca...@codeoscopic.com> wrote:
> Erik,
>
> sorry for the inconvenience, but GIT is just about not have to wait. Your
> mind are still in SVN and still does not switch to GIT.
>
> We at work are always merging and resolving conflicts in integration
> branches. We never merge directly in develop. For this kind of brutal
> changes you should:
>
> 1.- start an integration branch
> 2.- make merges in that brach (and maintain it over time what could be
> cumbersome as time and divergences happen)
> 3.- test that all is ok
> 4.- merge back into develop
>
> Erik, I know you are not yet a fan of GIT but think that the way that I'm
> propossing to you could never be done in SVN and most important, you don't
> stop other people works.
>
>
>
>
>
> 2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
>
>> Thanks for waiting with this commit till after I land the
>> 'goog.events' branch :-(
>>
>> EdB
>>
>>
>>
>> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
>> <ca...@codeoscopic.com> wrote:
>> > Hi Alex,
>> >
>> > fixed in my latest commit, not JS and SWF works ok. Things look better at
>> > daylight ;).
>> > Only JS side need to improve applicationModel to be getter/setter.
>> >
>> > I change SimpleBinding fix to try catch as you suggested.
>> >
>> > Best,
>> >
>> > Carlos
>> >
>> >
>> > 2013/5/3 Alex Harui <ah...@adobe.com>
>> >
>> >> Hi Carlos,
>> >>
>> >> I don't think the change to ViewBase.as was correct. The
>> applicationModel
>> >> property should be a getter. It looks like you reverted to a var.
>> >>
>> >> See if that fixes the SWF situation.
>> >>
>> >> -Alex
>> >>
>> >> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> wrote:
>> >>
>> >> > Alex,
>> >> >
>> >> > I shared a branch with some changes
>> "feature/applicationModel_refactor".
>> >> >
>> >> > applicationModel is the variable that makes createjs sample fail with
>> the
>> >> > change in simplebinding. I refactor to the way you show (hopefuly).
>> >> >
>> >> > In the JS version all is working right. But now SWF compilations
>> fails in
>> >> > runtime for both, _again and createjs sample (in different ways).
>> >> >
>> >> > Could you take a look and see if this refactor is in the way you
>> >> > commented?. I'll take a look tomorrow and see why SWFs are failing.
>> >> >
>> >> >
>> >> >
>> >> > 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>> >> >
>> >> >> Hi Alex,
>> >> >>
>> >> >> now I understand the problem. I was not aware of @expose and what you
>> >> >> comment here. Very important information. Tomorrow I'll go back to
>> the
>> >> >> sample and see if I can change the sample to get working with that
>> style
>> >> >> and remove this fix since I think it's better to force people to make
>> >> >> things in the good way.
>> >> >>
>> >> >>
>> >> >>
>> >> >> 2013/5/2 Alex Harui <ah...@adobe.com>
>> >> >>
>> >> >>> Hi Carlos,
>> >> >>>
>> >> >>> I saw the changes.
>> >> >>>
>> >> >>> I think it is a good fix, but you might want to add a comment that
>> the
>> >> >>> non-getter approach is likely to fail for non-public variables when
>> >> >>> minified.
>> >> >>>
>> >> >>> Right now, binding in FlexJS only works for public properties and
>> your
>> >> fix
>> >> >>> makes it work for public variables. Note that in some cases, the
>> >> backing
>> >> >>> variable for a public get/set is the same name because in JS the
>> >> pattern
>> >> >>> looks like:
>> >> >>>
>> >> >>> /** @private */
>> >> >>> var foo;
>> >> >>>
>> >> >>> /** @expose */
>> >> >>> function get_foo()
>> >> >>> {
>> >> >>> return this.foo;
>> >> >>> }
>> >> >>>
>> >> >>> The question is, what did the AS look like? If it looked like
>> >> >>>
>> >> >>> private var _foo;
>> >> >>> public function get foo()
>> >> >>> {
>> >> >>> return this._foo;
>> >> >>> }
>> >> >>>
>> >> >>> Then the JS code for your failure case should be changed to look
>> like
>> >> the
>> >> >>> recommended pattern and then you don't need the [this.sourceID] code
>> >> path
>> >> >>> as
>> >> >>> there will be a get_ function.
>> >> >>>
>> >> >>> If the AS looked like:
>> >> >>>
>> >> >>> public var foo;
>> >> >>>
>> >> >>> Then the JS should be
>> >> >>>
>> >> >>> /** @expose */
>> >> >>> Someclass.prototype.foo;
>> >> >>>
>> >> >>> If they forget to use @expose then it will likely fail when
>> minified.
>> >> >>>
>> >> >>> One more minor thing: Do you happen to know if try/catch is more
>> >> >>> efficient
>> >> >>> than doing a property lookup to see if it is undefined before
>> making a
>> >> >>> call?
>> >> >>>
>> >> >>> Anyway, thanks for contributing. We can use all the help we can
>> get.
>> >> >>>
>> >> >>>
>> >> >>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> >> wrote:
>> >> >>>
>> >> >>>> Hi Alex,
>> >> >>>>
>> >> >>>> I commit a solution that fixes the problem, but I don't know if is
>> >> >>>> compliant with the motivation you make this change (minified
>> version).
>> >> >>>>
>> >> >>>> I think binding should work even if we don't have a getter/setter
>> >> setup,
>> >> >>>> but I'm to new to this new framework that maybe this is not what
>> you
>> >> >>> have
>> >> >>>> in mind.
>> >> >>>>
>> >> >>>> So it's up to you to change if you see some problem with this fix.
>> >> >>>>
>> >> >>>>
>> >> >>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>> >> >>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <carlos.rovira@codeoscopic.com
>> >
>> >> >>> wrote:
>> >> >>>>>
>> >> >>>>>> Hi Alex
>> >> >>>>>>
>> >> >>>>>> this latest change in SimpleBinding:
>> >> >>>>>>
>> >> >>>>>> - this.source = this.document[this.sourceID];
>> >> >>>>>> + this.source = this.document['get_' + this.sourceID]();
>> >> >>>>>>
>> >> >>>>>>
>> >> >>>>>> Makes the createjs sample to not generate controls far beyond a
>> >> >>>>>> SimpleBinding.
>> >> >>>>>>
>> >> >>>>>> I need to change the sample code or it's a bug?
>> >> >>>>> Well, using getters is correct. Are you binding to something that
>> >> >>> isn't a
>> >> >>>>> getter in AS? Maybe the JS version of that property should have
>> >> been a
>> >> >>>>> get/set pair.
>> >> >>>>>
>> >> >>>>> But if you want, you can also try to make SimpleBinding tolerant
>> and
>> >> >>> find
>> >> >>>>> things that aren't getters.
>> >> >>>>>>
>> >> >>>>>> Thanks
>> >> >>>>>
>> >> >>>>> --
>> >> >>>>> Alex Harui
>> >> >>>>> Flex SDK Team
>> >> >>>>> Adobe Systems, Inc.
>> >> >>>>> http://blogs.adobe.com/aharui
>> >> >>>>>
>> >> >>>>>
>> >> >>>>
>> >> >>>
>> >> >>> --
>> >> >>> Alex Harui
>> >> >>> Flex SDK Team
>> >> >>> Adobe Systems, Inc.
>> >> >>> http://blogs.adobe.com/aharui
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Carlos Rovira
>> >> >> Director de Tecnología
>> >> >> M: +34 607 22 60 05
>> >> >> F: +34 912 94 80 80
>> >> >> http://www.codeoscopic.com
>> >> >> http://www.directwriter.es
>> >> >> http://www.avant2.es
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> Alex Harui
>> >> Flex SDK Team
>> >> Adobe Systems, Inc.
>> >> http://blogs.adobe.com/aharui
>> >>
>> >>
>> >
>> >
>> > --
>> > Carlos Rovira
>> > Director de Tecnología
>> > M: +34 607 22 60 05
>> > F: +34 912 94 80 80
>> > http://www.codeoscopic.com
>> > http://www.directwriter.es
>> > http://www.avant2.es
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
>
>
> --
> Carlos Rovira
> Director de Tecnología
> M: +34 607 22 60 05
> F: +34 912 94 80 80
> http://www.codeoscopic.com
> http://www.directwriter.es
> http://www.avant2.es
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Erik,
sorry for the inconvenience, but GIT is just about not have to wait. Your
mind are still in SVN and still does not switch to GIT.
We at work are always merging and resolving conflicts in integration
branches. We never merge directly in develop. For this kind of brutal
changes you should:
1.- start an integration branch
2.- make merges in that brach (and maintain it over time what could be
cumbersome as time and divergences happen)
3.- test that all is ok
4.- merge back into develop
Erik, I know you are not yet a fan of GIT but think that the way that I'm
propossing to you could never be done in SVN and most important, you don't
stop other people works.
2013/5/4 Erik de Bruin <er...@ixsoftware.nl>
> Thanks for waiting with this commit till after I land the
> 'goog.events' branch :-(
>
> EdB
>
>
>
> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
> <ca...@codeoscopic.com> wrote:
> > Hi Alex,
> >
> > fixed in my latest commit, not JS and SWF works ok. Things look better at
> > daylight ;).
> > Only JS side need to improve applicationModel to be getter/setter.
> >
> > I change SimpleBinding fix to try catch as you suggested.
> >
> > Best,
> >
> > Carlos
> >
> >
> > 2013/5/3 Alex Harui <ah...@adobe.com>
> >
> >> Hi Carlos,
> >>
> >> I don't think the change to ViewBase.as was correct. The
> applicationModel
> >> property should be a getter. It looks like you reverted to a var.
> >>
> >> See if that fixes the SWF situation.
> >>
> >> -Alex
> >>
> >> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com>
> wrote:
> >>
> >> > Alex,
> >> >
> >> > I shared a branch with some changes
> "feature/applicationModel_refactor".
> >> >
> >> > applicationModel is the variable that makes createjs sample fail with
> the
> >> > change in simplebinding. I refactor to the way you show (hopefuly).
> >> >
> >> > In the JS version all is working right. But now SWF compilations
> fails in
> >> > runtime for both, _again and createjs sample (in different ways).
> >> >
> >> > Could you take a look and see if this refactor is in the way you
> >> > commented?. I'll take a look tomorrow and see why SWFs are failing.
> >> >
> >> >
> >> >
> >> > 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
> >> >
> >> >> Hi Alex,
> >> >>
> >> >> now I understand the problem. I was not aware of @expose and what you
> >> >> comment here. Very important information. Tomorrow I'll go back to
> the
> >> >> sample and see if I can change the sample to get working with that
> style
> >> >> and remove this fix since I think it's better to force people to make
> >> >> things in the good way.
> >> >>
> >> >>
> >> >>
> >> >> 2013/5/2 Alex Harui <ah...@adobe.com>
> >> >>
> >> >>> Hi Carlos,
> >> >>>
> >> >>> I saw the changes.
> >> >>>
> >> >>> I think it is a good fix, but you might want to add a comment that
> the
> >> >>> non-getter approach is likely to fail for non-public variables when
> >> >>> minified.
> >> >>>
> >> >>> Right now, binding in FlexJS only works for public properties and
> your
> >> fix
> >> >>> makes it work for public variables. Note that in some cases, the
> >> backing
> >> >>> variable for a public get/set is the same name because in JS the
> >> pattern
> >> >>> looks like:
> >> >>>
> >> >>> /** @private */
> >> >>> var foo;
> >> >>>
> >> >>> /** @expose */
> >> >>> function get_foo()
> >> >>> {
> >> >>> return this.foo;
> >> >>> }
> >> >>>
> >> >>> The question is, what did the AS look like? If it looked like
> >> >>>
> >> >>> private var _foo;
> >> >>> public function get foo()
> >> >>> {
> >> >>> return this._foo;
> >> >>> }
> >> >>>
> >> >>> Then the JS code for your failure case should be changed to look
> like
> >> the
> >> >>> recommended pattern and then you don't need the [this.sourceID] code
> >> path
> >> >>> as
> >> >>> there will be a get_ function.
> >> >>>
> >> >>> If the AS looked like:
> >> >>>
> >> >>> public var foo;
> >> >>>
> >> >>> Then the JS should be
> >> >>>
> >> >>> /** @expose */
> >> >>> Someclass.prototype.foo;
> >> >>>
> >> >>> If they forget to use @expose then it will likely fail when
> minified.
> >> >>>
> >> >>> One more minor thing: Do you happen to know if try/catch is more
> >> >>> efficient
> >> >>> than doing a property lookup to see if it is undefined before
> making a
> >> >>> call?
> >> >>>
> >> >>> Anyway, thanks for contributing. We can use all the help we can
> get.
> >> >>>
> >> >>>
> >> >>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
> >> wrote:
> >> >>>
> >> >>>> Hi Alex,
> >> >>>>
> >> >>>> I commit a solution that fixes the problem, but I don't know if is
> >> >>>> compliant with the motivation you make this change (minified
> version).
> >> >>>>
> >> >>>> I think binding should work even if we don't have a getter/setter
> >> setup,
> >> >>>> but I'm to new to this new framework that maybe this is not what
> you
> >> >>> have
> >> >>>> in mind.
> >> >>>>
> >> >>>> So it's up to you to change if you see some problem with this fix.
> >> >>>>
> >> >>>>
> >> >>>> 2013/5/2 Alex Harui <ah...@adobe.com>
> >> >>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <carlos.rovira@codeoscopic.com
> >
> >> >>> wrote:
> >> >>>>>
> >> >>>>>> Hi Alex
> >> >>>>>>
> >> >>>>>> this latest change in SimpleBinding:
> >> >>>>>>
> >> >>>>>> - this.source = this.document[this.sourceID];
> >> >>>>>> + this.source = this.document['get_' + this.sourceID]();
> >> >>>>>>
> >> >>>>>>
> >> >>>>>> Makes the createjs sample to not generate controls far beyond a
> >> >>>>>> SimpleBinding.
> >> >>>>>>
> >> >>>>>> I need to change the sample code or it's a bug?
> >> >>>>> Well, using getters is correct. Are you binding to something that
> >> >>> isn't a
> >> >>>>> getter in AS? Maybe the JS version of that property should have
> >> been a
> >> >>>>> get/set pair.
> >> >>>>>
> >> >>>>> But if you want, you can also try to make SimpleBinding tolerant
> and
> >> >>> find
> >> >>>>> things that aren't getters.
> >> >>>>>>
> >> >>>>>> Thanks
> >> >>>>>
> >> >>>>> --
> >> >>>>> Alex Harui
> >> >>>>> Flex SDK Team
> >> >>>>> Adobe Systems, Inc.
> >> >>>>> http://blogs.adobe.com/aharui
> >> >>>>>
> >> >>>>>
> >> >>>>
> >> >>>
> >> >>> --
> >> >>> Alex Harui
> >> >>> Flex SDK Team
> >> >>> Adobe Systems, Inc.
> >> >>> http://blogs.adobe.com/aharui
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >> --
> >> >> Carlos Rovira
> >> >> Director de Tecnología
> >> >> M: +34 607 22 60 05
> >> >> F: +34 912 94 80 80
> >> >> http://www.codeoscopic.com
> >> >> http://www.directwriter.es
> >> >> http://www.avant2.es
> >> >>
> >> >
> >> >
> >>
> >> --
> >> Alex Harui
> >> Flex SDK Team
> >> Adobe Systems, Inc.
> >> http://blogs.adobe.com/aharui
> >>
> >>
> >
> >
> > --
> > Carlos Rovira
> > Director de Tecnología
> > M: +34 607 22 60 05
> > F: +34 912 94 80 80
> > http://www.codeoscopic.com
> > http://www.directwriter.es
> > http://www.avant2.es
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Alex Harui <ah...@adobe.com>.
Should hopefully be a small change. How is it going? Did you get the
publisher to work again?
On 5/3/13 10:23 PM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> Thanks for waiting with this commit till after I land the
> 'goog.events' branch :-(
>
> EdB
>
>
>
> On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
> <ca...@codeoscopic.com> wrote:
>> Hi Alex,
>>
>> fixed in my latest commit, not JS and SWF works ok. Things look better at
>> daylight ;).
>> Only JS side need to improve applicationModel to be getter/setter.
>>
>> I change SimpleBinding fix to try catch as you suggested.
>>
>> Best,
>>
>> Carlos
>>
>>
>> 2013/5/3 Alex Harui <ah...@adobe.com>
>>
>>> Hi Carlos,
>>>
>>> I don't think the change to ViewBase.as was correct. The applicationModel
>>> property should be a getter. It looks like you reverted to a var.
>>>
>>> See if that fixes the SWF situation.
>>>
>>> -Alex
>>>
>>> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>>
>>>> Alex,
>>>>
>>>> I shared a branch with some changes "feature/applicationModel_refactor".
>>>>
>>>> applicationModel is the variable that makes createjs sample fail with the
>>>> change in simplebinding. I refactor to the way you show (hopefuly).
>>>>
>>>> In the JS version all is working right. But now SWF compilations fails in
>>>> runtime for both, _again and createjs sample (in different ways).
>>>>
>>>> Could you take a look and see if this refactor is in the way you
>>>> commented?. I'll take a look tomorrow and see why SWFs are failing.
>>>>
>>>>
>>>>
>>>> 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>>>>
>>>>> Hi Alex,
>>>>>
>>>>> now I understand the problem. I was not aware of @expose and what you
>>>>> comment here. Very important information. Tomorrow I'll go back to the
>>>>> sample and see if I can change the sample to get working with that style
>>>>> and remove this fix since I think it's better to force people to make
>>>>> things in the good way.
>>>>>
>>>>>
>>>>>
>>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>>
>>>>>> Hi Carlos,
>>>>>>
>>>>>> I saw the changes.
>>>>>>
>>>>>> I think it is a good fix, but you might want to add a comment that the
>>>>>> non-getter approach is likely to fail for non-public variables when
>>>>>> minified.
>>>>>>
>>>>>> Right now, binding in FlexJS only works for public properties and your
>>> fix
>>>>>> makes it work for public variables. Note that in some cases, the
>>> backing
>>>>>> variable for a public get/set is the same name because in JS the
>>> pattern
>>>>>> looks like:
>>>>>>
>>>>>> /** @private */
>>>>>> var foo;
>>>>>>
>>>>>> /** @expose */
>>>>>> function get_foo()
>>>>>> {
>>>>>> return this.foo;
>>>>>> }
>>>>>>
>>>>>> The question is, what did the AS look like? If it looked like
>>>>>>
>>>>>> private var _foo;
>>>>>> public function get foo()
>>>>>> {
>>>>>> return this._foo;
>>>>>> }
>>>>>>
>>>>>> Then the JS code for your failure case should be changed to look like
>>> the
>>>>>> recommended pattern and then you don't need the [this.sourceID] code
>>> path
>>>>>> as
>>>>>> there will be a get_ function.
>>>>>>
>>>>>> If the AS looked like:
>>>>>>
>>>>>> public var foo;
>>>>>>
>>>>>> Then the JS should be
>>>>>>
>>>>>> /** @expose */
>>>>>> Someclass.prototype.foo;
>>>>>>
>>>>>> If they forget to use @expose then it will likely fail when minified.
>>>>>>
>>>>>> One more minor thing: Do you happen to know if try/catch is more
>>>>>> efficient
>>>>>> than doing a property lookup to see if it is undefined before making a
>>>>>> call?
>>>>>>
>>>>>> Anyway, thanks for contributing. We can use all the help we can get.
>>>>>>
>>>>>>
>>>>>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>> wrote:
>>>>>>
>>>>>>> Hi Alex,
>>>>>>>
>>>>>>> I commit a solution that fixes the problem, but I don't know if is
>>>>>>> compliant with the motivation you make this change (minified version).
>>>>>>>
>>>>>>> I think binding should work even if we don't have a getter/setter
>>> setup,
>>>>>>> but I'm to new to this new framework that maybe this is not what you
>>>>>> have
>>>>>>> in mind.
>>>>>>>
>>>>>>> So it's up to you to change if you see some problem with this fix.
>>>>>>>
>>>>>>>
>>>>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Alex
>>>>>>>>>
>>>>>>>>> this latest change in SimpleBinding:
>>>>>>>>>
>>>>>>>>> - this.source = this.document[this.sourceID];
>>>>>>>>> + this.source = this.document['get_' + this.sourceID]();
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Makes the createjs sample to not generate controls far beyond a
>>>>>>>>> SimpleBinding.
>>>>>>>>>
>>>>>>>>> I need to change the sample code or it's a bug?
>>>>>>>> Well, using getters is correct. Are you binding to something that
>>>>>> isn't a
>>>>>>>> getter in AS? Maybe the JS version of that property should have
>>> been a
>>>>>>>> get/set pair.
>>>>>>>>
>>>>>>>> But if you want, you can also try to make SimpleBinding tolerant and
>>>>>> find
>>>>>>>> things that aren't getters.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> --
>>>>>>>> Alex Harui
>>>>>>>> Flex SDK Team
>>>>>>>> Adobe Systems, Inc.
>>>>>>>> http://blogs.adobe.com/aharui
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Alex Harui
>>>>>> Flex SDK Team
>>>>>> Adobe Systems, Inc.
>>>>>> http://blogs.adobe.com/aharui
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Carlos Rovira
>>>>> Director de Tecnología
>>>>> M: +34 607 22 60 05
>>>>> F: +34 912 94 80 80
>>>>> http://www.codeoscopic.com
>>>>> http://www.directwriter.es
>>>>> http://www.avant2.es
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
>>>
>>>
>>
>>
>> --
>> Carlos Rovira
>> Director de Tecnología
>> M: +34 607 22 60 05
>> F: +34 912 94 80 80
>> http://www.codeoscopic.com
>> http://www.directwriter.es
>> http://www.avant2.es
>
>
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
Re: SimpleBinding changes make createjs sample stop working
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Thanks for waiting with this commit till after I land the
'goog.events' branch :-(
EdB
On Fri, May 3, 2013 at 11:48 PM, Carlos Rovira
<ca...@codeoscopic.com> wrote:
> Hi Alex,
>
> fixed in my latest commit, not JS and SWF works ok. Things look better at
> daylight ;).
> Only JS side need to improve applicationModel to be getter/setter.
>
> I change SimpleBinding fix to try catch as you suggested.
>
> Best,
>
> Carlos
>
>
> 2013/5/3 Alex Harui <ah...@adobe.com>
>
>> Hi Carlos,
>>
>> I don't think the change to ViewBase.as was correct. The applicationModel
>> property should be a getter. It looks like you reverted to a var.
>>
>> See if that fixes the SWF situation.
>>
>> -Alex
>>
>> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>
>> > Alex,
>> >
>> > I shared a branch with some changes "feature/applicationModel_refactor".
>> >
>> > applicationModel is the variable that makes createjs sample fail with the
>> > change in simplebinding. I refactor to the way you show (hopefuly).
>> >
>> > In the JS version all is working right. But now SWF compilations fails in
>> > runtime for both, _again and createjs sample (in different ways).
>> >
>> > Could you take a look and see if this refactor is in the way you
>> > commented?. I'll take a look tomorrow and see why SWFs are failing.
>> >
>> >
>> >
>> > 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>> >
>> >> Hi Alex,
>> >>
>> >> now I understand the problem. I was not aware of @expose and what you
>> >> comment here. Very important information. Tomorrow I'll go back to the
>> >> sample and see if I can change the sample to get working with that style
>> >> and remove this fix since I think it's better to force people to make
>> >> things in the good way.
>> >>
>> >>
>> >>
>> >> 2013/5/2 Alex Harui <ah...@adobe.com>
>> >>
>> >>> Hi Carlos,
>> >>>
>> >>> I saw the changes.
>> >>>
>> >>> I think it is a good fix, but you might want to add a comment that the
>> >>> non-getter approach is likely to fail for non-public variables when
>> >>> minified.
>> >>>
>> >>> Right now, binding in FlexJS only works for public properties and your
>> fix
>> >>> makes it work for public variables. Note that in some cases, the
>> backing
>> >>> variable for a public get/set is the same name because in JS the
>> pattern
>> >>> looks like:
>> >>>
>> >>> /** @private */
>> >>> var foo;
>> >>>
>> >>> /** @expose */
>> >>> function get_foo()
>> >>> {
>> >>> return this.foo;
>> >>> }
>> >>>
>> >>> The question is, what did the AS look like? If it looked like
>> >>>
>> >>> private var _foo;
>> >>> public function get foo()
>> >>> {
>> >>> return this._foo;
>> >>> }
>> >>>
>> >>> Then the JS code for your failure case should be changed to look like
>> the
>> >>> recommended pattern and then you don't need the [this.sourceID] code
>> path
>> >>> as
>> >>> there will be a get_ function.
>> >>>
>> >>> If the AS looked like:
>> >>>
>> >>> public var foo;
>> >>>
>> >>> Then the JS should be
>> >>>
>> >>> /** @expose */
>> >>> Someclass.prototype.foo;
>> >>>
>> >>> If they forget to use @expose then it will likely fail when minified.
>> >>>
>> >>> One more minor thing: Do you happen to know if try/catch is more
>> >>> efficient
>> >>> than doing a property lookup to see if it is undefined before making a
>> >>> call?
>> >>>
>> >>> Anyway, thanks for contributing. We can use all the help we can get.
>> >>>
>> >>>
>> >>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> wrote:
>> >>>
>> >>>> Hi Alex,
>> >>>>
>> >>>> I commit a solution that fixes the problem, but I don't know if is
>> >>>> compliant with the motivation you make this change (minified version).
>> >>>>
>> >>>> I think binding should work even if we don't have a getter/setter
>> setup,
>> >>>> but I'm to new to this new framework that maybe this is not what you
>> >>> have
>> >>>> in mind.
>> >>>>
>> >>>> So it's up to you to change if you see some problem with this fix.
>> >>>>
>> >>>>
>> >>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>> >>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> >>> wrote:
>> >>>>>
>> >>>>>> Hi Alex
>> >>>>>>
>> >>>>>> this latest change in SimpleBinding:
>> >>>>>>
>> >>>>>> - this.source = this.document[this.sourceID];
>> >>>>>> + this.source = this.document['get_' + this.sourceID]();
>> >>>>>>
>> >>>>>>
>> >>>>>> Makes the createjs sample to not generate controls far beyond a
>> >>>>>> SimpleBinding.
>> >>>>>>
>> >>>>>> I need to change the sample code or it's a bug?
>> >>>>> Well, using getters is correct. Are you binding to something that
>> >>> isn't a
>> >>>>> getter in AS? Maybe the JS version of that property should have
>> been a
>> >>>>> get/set pair.
>> >>>>>
>> >>>>> But if you want, you can also try to make SimpleBinding tolerant and
>> >>> find
>> >>>>> things that aren't getters.
>> >>>>>>
>> >>>>>> Thanks
>> >>>>>
>> >>>>> --
>> >>>>> Alex Harui
>> >>>>> Flex SDK Team
>> >>>>> Adobe Systems, Inc.
>> >>>>> http://blogs.adobe.com/aharui
>> >>>>>
>> >>>>>
>> >>>>
>> >>>
>> >>> --
>> >>> Alex Harui
>> >>> Flex SDK Team
>> >>> Adobe Systems, Inc.
>> >>> http://blogs.adobe.com/aharui
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Carlos Rovira
>> >> Director de Tecnología
>> >> M: +34 607 22 60 05
>> >> F: +34 912 94 80 80
>> >> http://www.codeoscopic.com
>> >> http://www.directwriter.es
>> >> http://www.avant2.es
>> >>
>> >
>> >
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>
>
>
> --
> Carlos Rovira
> Director de Tecnología
> M: +34 607 22 60 05
> F: +34 912 94 80 80
> http://www.codeoscopic.com
> http://www.directwriter.es
> http://www.avant2.es
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Alex,
fixed in my latest commit, not JS and SWF works ok. Things look better at
daylight ;).
Only JS side need to improve applicationModel to be getter/setter.
I change SimpleBinding fix to try catch as you suggested.
Best,
Carlos
2013/5/3 Alex Harui <ah...@adobe.com>
> Hi Carlos,
>
> I don't think the change to ViewBase.as was correct. The applicationModel
> property should be a getter. It looks like you reverted to a var.
>
> See if that fixes the SWF situation.
>
> -Alex
>
> On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>
> > Alex,
> >
> > I shared a branch with some changes "feature/applicationModel_refactor".
> >
> > applicationModel is the variable that makes createjs sample fail with the
> > change in simplebinding. I refactor to the way you show (hopefuly).
> >
> > In the JS version all is working right. But now SWF compilations fails in
> > runtime for both, _again and createjs sample (in different ways).
> >
> > Could you take a look and see if this refactor is in the way you
> > commented?. I'll take a look tomorrow and see why SWFs are failing.
> >
> >
> >
> > 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
> >
> >> Hi Alex,
> >>
> >> now I understand the problem. I was not aware of @expose and what you
> >> comment here. Very important information. Tomorrow I'll go back to the
> >> sample and see if I can change the sample to get working with that style
> >> and remove this fix since I think it's better to force people to make
> >> things in the good way.
> >>
> >>
> >>
> >> 2013/5/2 Alex Harui <ah...@adobe.com>
> >>
> >>> Hi Carlos,
> >>>
> >>> I saw the changes.
> >>>
> >>> I think it is a good fix, but you might want to add a comment that the
> >>> non-getter approach is likely to fail for non-public variables when
> >>> minified.
> >>>
> >>> Right now, binding in FlexJS only works for public properties and your
> fix
> >>> makes it work for public variables. Note that in some cases, the
> backing
> >>> variable for a public get/set is the same name because in JS the
> pattern
> >>> looks like:
> >>>
> >>> /** @private */
> >>> var foo;
> >>>
> >>> /** @expose */
> >>> function get_foo()
> >>> {
> >>> return this.foo;
> >>> }
> >>>
> >>> The question is, what did the AS look like? If it looked like
> >>>
> >>> private var _foo;
> >>> public function get foo()
> >>> {
> >>> return this._foo;
> >>> }
> >>>
> >>> Then the JS code for your failure case should be changed to look like
> the
> >>> recommended pattern and then you don't need the [this.sourceID] code
> path
> >>> as
> >>> there will be a get_ function.
> >>>
> >>> If the AS looked like:
> >>>
> >>> public var foo;
> >>>
> >>> Then the JS should be
> >>>
> >>> /** @expose */
> >>> Someclass.prototype.foo;
> >>>
> >>> If they forget to use @expose then it will likely fail when minified.
> >>>
> >>> One more minor thing: Do you happen to know if try/catch is more
> >>> efficient
> >>> than doing a property lookup to see if it is undefined before making a
> >>> call?
> >>>
> >>> Anyway, thanks for contributing. We can use all the help we can get.
> >>>
> >>>
> >>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com>
> wrote:
> >>>
> >>>> Hi Alex,
> >>>>
> >>>> I commit a solution that fixes the problem, but I don't know if is
> >>>> compliant with the motivation you make this change (minified version).
> >>>>
> >>>> I think binding should work even if we don't have a getter/setter
> setup,
> >>>> but I'm to new to this new framework that maybe this is not what you
> >>> have
> >>>> in mind.
> >>>>
> >>>> So it's up to you to change if you see some problem with this fix.
> >>>>
> >>>>
> >>>> 2013/5/2 Alex Harui <ah...@adobe.com>
> >>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
> >>> wrote:
> >>>>>
> >>>>>> Hi Alex
> >>>>>>
> >>>>>> this latest change in SimpleBinding:
> >>>>>>
> >>>>>> - this.source = this.document[this.sourceID];
> >>>>>> + this.source = this.document['get_' + this.sourceID]();
> >>>>>>
> >>>>>>
> >>>>>> Makes the createjs sample to not generate controls far beyond a
> >>>>>> SimpleBinding.
> >>>>>>
> >>>>>> I need to change the sample code or it's a bug?
> >>>>> Well, using getters is correct. Are you binding to something that
> >>> isn't a
> >>>>> getter in AS? Maybe the JS version of that property should have
> been a
> >>>>> get/set pair.
> >>>>>
> >>>>> But if you want, you can also try to make SimpleBinding tolerant and
> >>> find
> >>>>> things that aren't getters.
> >>>>>>
> >>>>>> Thanks
> >>>>>
> >>>>> --
> >>>>> Alex Harui
> >>>>> Flex SDK Team
> >>>>> Adobe Systems, Inc.
> >>>>> http://blogs.adobe.com/aharui
> >>>>>
> >>>>>
> >>>>
> >>>
> >>> --
> >>> Alex Harui
> >>> Flex SDK Team
> >>> Adobe Systems, Inc.
> >>> http://blogs.adobe.com/aharui
> >>>
> >>>
> >>
> >>
> >> --
> >> Carlos Rovira
> >> Director de Tecnología
> >> M: +34 607 22 60 05
> >> F: +34 912 94 80 80
> >> http://www.codeoscopic.com
> >> http://www.directwriter.es
> >> http://www.avant2.es
> >>
> >
> >
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Alex Harui <ah...@adobe.com>.
Hi Carlos,
I don't think the change to ViewBase.as was correct. The applicationModel
property should be a getter. It looks like you reverted to a var.
See if that fixes the SWF situation.
-Alex
On 5/2/13 6:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
> Alex,
>
> I shared a branch with some changes "feature/applicationModel_refactor".
>
> applicationModel is the variable that makes createjs sample fail with the
> change in simplebinding. I refactor to the way you show (hopefuly).
>
> In the JS version all is working right. But now SWF compilations fails in
> runtime for both, _again and createjs sample (in different ways).
>
> Could you take a look and see if this refactor is in the way you
> commented?. I'll take a look tomorrow and see why SWFs are failing.
>
>
>
> 2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
>
>> Hi Alex,
>>
>> now I understand the problem. I was not aware of @expose and what you
>> comment here. Very important information. Tomorrow I'll go back to the
>> sample and see if I can change the sample to get working with that style
>> and remove this fix since I think it's better to force people to make
>> things in the good way.
>>
>>
>>
>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>
>>> Hi Carlos,
>>>
>>> I saw the changes.
>>>
>>> I think it is a good fix, but you might want to add a comment that the
>>> non-getter approach is likely to fail for non-public variables when
>>> minified.
>>>
>>> Right now, binding in FlexJS only works for public properties and your fix
>>> makes it work for public variables. Note that in some cases, the backing
>>> variable for a public get/set is the same name because in JS the pattern
>>> looks like:
>>>
>>> /** @private */
>>> var foo;
>>>
>>> /** @expose */
>>> function get_foo()
>>> {
>>> return this.foo;
>>> }
>>>
>>> The question is, what did the AS look like? If it looked like
>>>
>>> private var _foo;
>>> public function get foo()
>>> {
>>> return this._foo;
>>> }
>>>
>>> Then the JS code for your failure case should be changed to look like the
>>> recommended pattern and then you don't need the [this.sourceID] code path
>>> as
>>> there will be a get_ function.
>>>
>>> If the AS looked like:
>>>
>>> public var foo;
>>>
>>> Then the JS should be
>>>
>>> /** @expose */
>>> Someclass.prototype.foo;
>>>
>>> If they forget to use @expose then it will likely fail when minified.
>>>
>>> One more minor thing: Do you happen to know if try/catch is more
>>> efficient
>>> than doing a property lookup to see if it is undefined before making a
>>> call?
>>>
>>> Anyway, thanks for contributing. We can use all the help we can get.
>>>
>>>
>>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>>
>>>> Hi Alex,
>>>>
>>>> I commit a solution that fixes the problem, but I don't know if is
>>>> compliant with the motivation you make this change (minified version).
>>>>
>>>> I think binding should work even if we don't have a getter/setter setup,
>>>> but I'm to new to this new framework that maybe this is not what you
>>> have
>>>> in mind.
>>>>
>>>> So it's up to you to change if you see some problem with this fix.
>>>>
>>>>
>>>> 2013/5/2 Alex Harui <ah...@adobe.com>
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>>> wrote:
>>>>>
>>>>>> Hi Alex
>>>>>>
>>>>>> this latest change in SimpleBinding:
>>>>>>
>>>>>> - this.source = this.document[this.sourceID];
>>>>>> + this.source = this.document['get_' + this.sourceID]();
>>>>>>
>>>>>>
>>>>>> Makes the createjs sample to not generate controls far beyond a
>>>>>> SimpleBinding.
>>>>>>
>>>>>> I need to change the sample code or it's a bug?
>>>>> Well, using getters is correct. Are you binding to something that
>>> isn't a
>>>>> getter in AS? Maybe the JS version of that property should have been a
>>>>> get/set pair.
>>>>>
>>>>> But if you want, you can also try to make SimpleBinding tolerant and
>>> find
>>>>> things that aren't getters.
>>>>>>
>>>>>> Thanks
>>>>>
>>>>> --
>>>>> Alex Harui
>>>>> Flex SDK Team
>>>>> Adobe Systems, Inc.
>>>>> http://blogs.adobe.com/aharui
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
>>>
>>>
>>
>>
>> --
>> Carlos Rovira
>> Director de Tecnología
>> M: +34 607 22 60 05
>> F: +34 912 94 80 80
>> http://www.codeoscopic.com
>> http://www.directwriter.es
>> http://www.avant2.es
>>
>
>
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Alex,
I shared a branch with some changes "feature/applicationModel_refactor".
applicationModel is the variable that makes createjs sample fail with the
change in simplebinding. I refactor to the way you show (hopefuly).
In the JS version all is working right. But now SWF compilations fails in
runtime for both, _again and createjs sample (in different ways).
Could you take a look and see if this refactor is in the way you
commented?. I'll take a look tomorrow and see why SWFs are failing.
2013/5/3 Carlos Rovira <ca...@codeoscopic.com>
> Hi Alex,
>
> now I understand the problem. I was not aware of @expose and what you
> comment here. Very important information. Tomorrow I'll go back to the
> sample and see if I can change the sample to get working with that style
> and remove this fix since I think it's better to force people to make
> things in the good way.
>
>
>
> 2013/5/2 Alex Harui <ah...@adobe.com>
>
>> Hi Carlos,
>>
>> I saw the changes.
>>
>> I think it is a good fix, but you might want to add a comment that the
>> non-getter approach is likely to fail for non-public variables when
>> minified.
>>
>> Right now, binding in FlexJS only works for public properties and your fix
>> makes it work for public variables. Note that in some cases, the backing
>> variable for a public get/set is the same name because in JS the pattern
>> looks like:
>>
>> /** @private */
>> var foo;
>>
>> /** @expose */
>> function get_foo()
>> {
>> return this.foo;
>> }
>>
>> The question is, what did the AS look like? If it looked like
>>
>> private var _foo;
>> public function get foo()
>> {
>> return this._foo;
>> }
>>
>> Then the JS code for your failure case should be changed to look like the
>> recommended pattern and then you don't need the [this.sourceID] code path
>> as
>> there will be a get_ function.
>>
>> If the AS looked like:
>>
>> public var foo;
>>
>> Then the JS should be
>>
>> /** @expose */
>> Someclass.prototype.foo;
>>
>> If they forget to use @expose then it will likely fail when minified.
>>
>> One more minor thing: Do you happen to know if try/catch is more
>> efficient
>> than doing a property lookup to see if it is undefined before making a
>> call?
>>
>> Anyway, thanks for contributing. We can use all the help we can get.
>>
>>
>> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>
>> > Hi Alex,
>> >
>> > I commit a solution that fixes the problem, but I don't know if is
>> > compliant with the motivation you make this change (minified version).
>> >
>> > I think binding should work even if we don't have a getter/setter setup,
>> > but I'm to new to this new framework that maybe this is not what you
>> have
>> > in mind.
>> >
>> > So it's up to you to change if you see some problem with this fix.
>> >
>> >
>> > 2013/5/2 Alex Harui <ah...@adobe.com>
>> >
>> >>
>> >>
>> >>
>> >> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
>> wrote:
>> >>
>> >>> Hi Alex
>> >>>
>> >>> this latest change in SimpleBinding:
>> >>>
>> >>> - this.source = this.document[this.sourceID];
>> >>> + this.source = this.document['get_' + this.sourceID]();
>> >>>
>> >>>
>> >>> Makes the createjs sample to not generate controls far beyond a
>> >>> SimpleBinding.
>> >>>
>> >>> I need to change the sample code or it's a bug?
>> >> Well, using getters is correct. Are you binding to something that
>> isn't a
>> >> getter in AS? Maybe the JS version of that property should have been a
>> >> get/set pair.
>> >>
>> >> But if you want, you can also try to make SimpleBinding tolerant and
>> find
>> >> things that aren't getters.
>> >>>
>> >>> Thanks
>> >>
>> >> --
>> >> Alex Harui
>> >> Flex SDK Team
>> >> Adobe Systems, Inc.
>> >> http://blogs.adobe.com/aharui
>> >>
>> >>
>> >
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>
>
>
> --
> Carlos Rovira
> Director de Tecnología
> M: +34 607 22 60 05
> F: +34 912 94 80 80
> http://www.codeoscopic.com
> http://www.directwriter.es
> http://www.avant2.es
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Alex Harui <ah...@adobe.com>.
On 5/2/13 5:17 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
> Hi Alex,
>
> now I understand the problem. I was not aware of @expose and what you
> comment here. Very important information. Tomorrow I'll go back to the
> sample and see if I can change the sample to get working with that style
> and remove this fix since I think it's better to force people to make
> things in the good way.
>
I don't think you have to remove the fix. It should be ok to have a public
var instead of a getter. But I would like to know if the scenario that
exposed this should have been implemented with a getter.
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Alex,
now I understand the problem. I was not aware of @expose and what you
comment here. Very important information. Tomorrow I'll go back to the
sample and see if I can change the sample to get working with that style
and remove this fix since I think it's better to force people to make
things in the good way.
2013/5/2 Alex Harui <ah...@adobe.com>
> Hi Carlos,
>
> I saw the changes.
>
> I think it is a good fix, but you might want to add a comment that the
> non-getter approach is likely to fail for non-public variables when
> minified.
>
> Right now, binding in FlexJS only works for public properties and your fix
> makes it work for public variables. Note that in some cases, the backing
> variable for a public get/set is the same name because in JS the pattern
> looks like:
>
> /** @private */
> var foo;
>
> /** @expose */
> function get_foo()
> {
> return this.foo;
> }
>
> The question is, what did the AS look like? If it looked like
>
> private var _foo;
> public function get foo()
> {
> return this._foo;
> }
>
> Then the JS code for your failure case should be changed to look like the
> recommended pattern and then you don't need the [this.sourceID] code path
> as
> there will be a get_ function.
>
> If the AS looked like:
>
> public var foo;
>
> Then the JS should be
>
> /** @expose */
> Someclass.prototype.foo;
>
> If they forget to use @expose then it will likely fail when minified.
>
> One more minor thing: Do you happen to know if try/catch is more efficient
> than doing a property lookup to see if it is undefined before making a
> call?
>
> Anyway, thanks for contributing. We can use all the help we can get.
>
>
> On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>
> > Hi Alex,
> >
> > I commit a solution that fixes the problem, but I don't know if is
> > compliant with the motivation you make this change (minified version).
> >
> > I think binding should work even if we don't have a getter/setter setup,
> > but I'm to new to this new framework that maybe this is not what you have
> > in mind.
> >
> > So it's up to you to change if you see some problem with this fix.
> >
> >
> > 2013/5/2 Alex Harui <ah...@adobe.com>
> >
> >>
> >>
> >>
> >> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com>
> wrote:
> >>
> >>> Hi Alex
> >>>
> >>> this latest change in SimpleBinding:
> >>>
> >>> - this.source = this.document[this.sourceID];
> >>> + this.source = this.document['get_' + this.sourceID]();
> >>>
> >>>
> >>> Makes the createjs sample to not generate controls far beyond a
> >>> SimpleBinding.
> >>>
> >>> I need to change the sample code or it's a bug?
> >> Well, using getters is correct. Are you binding to something that
> isn't a
> >> getter in AS? Maybe the JS version of that property should have been a
> >> get/set pair.
> >>
> >> But if you want, you can also try to make SimpleBinding tolerant and
> find
> >> things that aren't getters.
> >>>
> >>> Thanks
> >>
> >> --
> >> Alex Harui
> >> Flex SDK Team
> >> Adobe Systems, Inc.
> >> http://blogs.adobe.com/aharui
> >>
> >>
> >
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Alex Harui <ah...@adobe.com>.
Hi Carlos,
I saw the changes.
I think it is a good fix, but you might want to add a comment that the
non-getter approach is likely to fail for non-public variables when
minified.
Right now, binding in FlexJS only works for public properties and your fix
makes it work for public variables. Note that in some cases, the backing
variable for a public get/set is the same name because in JS the pattern
looks like:
/** @private */
var foo;
/** @expose */
function get_foo()
{
return this.foo;
}
The question is, what did the AS look like? If it looked like
private var _foo;
public function get foo()
{
return this._foo;
}
Then the JS code for your failure case should be changed to look like the
recommended pattern and then you don't need the [this.sourceID] code path as
there will be a get_ function.
If the AS looked like:
public var foo;
Then the JS should be
/** @expose */
Someclass.prototype.foo;
If they forget to use @expose then it will likely fail when minified.
One more minor thing: Do you happen to know if try/catch is more efficient
than doing a property lookup to see if it is undefined before making a call?
Anyway, thanks for contributing. We can use all the help we can get.
On 5/2/13 2:35 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
> Hi Alex,
>
> I commit a solution that fixes the problem, but I don't know if is
> compliant with the motivation you make this change (minified version).
>
> I think binding should work even if we don't have a getter/setter setup,
> but I'm to new to this new framework that maybe this is not what you have
> in mind.
>
> So it's up to you to change if you see some problem with this fix.
>
>
> 2013/5/2 Alex Harui <ah...@adobe.com>
>
>>
>>
>>
>> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>>
>>> Hi Alex
>>>
>>> this latest change in SimpleBinding:
>>>
>>> - this.source = this.document[this.sourceID];
>>> + this.source = this.document['get_' + this.sourceID]();
>>>
>>>
>>> Makes the createjs sample to not generate controls far beyond a
>>> SimpleBinding.
>>>
>>> I need to change the sample code or it's a bug?
>> Well, using getters is correct. Are you binding to something that isn't a
>> getter in AS? Maybe the JS version of that property should have been a
>> get/set pair.
>>
>> But if you want, you can also try to make SimpleBinding tolerant and find
>> things that aren't getters.
>>>
>>> Thanks
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>
>
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui
Re: SimpleBinding changes make createjs sample stop working
Posted by Carlos Rovira <ca...@codeoscopic.com>.
Hi Alex,
I commit a solution that fixes the problem, but I don't know if is
compliant with the motivation you make this change (minified version).
I think binding should work even if we don't have a getter/setter setup,
but I'm to new to this new framework that maybe this is not what you have
in mind.
So it's up to you to change if you see some problem with this fix.
2013/5/2 Alex Harui <ah...@adobe.com>
>
>
>
> On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
>
> > Hi Alex
> >
> > this latest change in SimpleBinding:
> >
> > - this.source = this.document[this.sourceID];
> > + this.source = this.document['get_' + this.sourceID]();
> >
> >
> > Makes the createjs sample to not generate controls far beyond a
> > SimpleBinding.
> >
> > I need to change the sample code or it's a bug?
> Well, using getters is correct. Are you binding to something that isn't a
> getter in AS? Maybe the JS version of that property should have been a
> get/set pair.
>
> But if you want, you can also try to make SimpleBinding tolerant and find
> things that aren't getters.
> >
> > Thanks
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>
--
Carlos Rovira
Director de Tecnología
M: +34 607 22 60 05
F: +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es
Re: SimpleBinding changes make createjs sample stop working
Posted by Alex Harui <ah...@adobe.com>.
On 5/1/13 3:40 PM, "Carlos Rovira" <ca...@codeoscopic.com> wrote:
> Hi Alex
>
> this latest change in SimpleBinding:
>
> - this.source = this.document[this.sourceID];
> + this.source = this.document['get_' + this.sourceID]();
>
>
> Makes the createjs sample to not generate controls far beyond a
> SimpleBinding.
>
> I need to change the sample code or it's a bug?
Well, using getters is correct. Are you binding to something that isn't a
getter in AS? Maybe the JS version of that property should have been a
get/set pair.
But if you want, you can also try to make SimpleBinding tolerant and find
things that aren't getters.
>
> Thanks
--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui