Implicit 'this' trips us up once again :-(
On Wed, Sep 30, 2009 at 1:50 PM, P T Withington <[email protected]> wrote: > This little caveat: > > Note: The body of a <handler> is implicitly a method in a <view>. >> Because of the above proposal, the body of a <handler> in a <state> >> will implicitly be a function, not a method. This is an unfortunate >> restriction that will surely cause confusion, but I don't have any >> better solution at present. >> > > is what kept me from going forward with the idea. > > In addition, a constraint is a method (or two, if it is an $always > contraint), and many states apply/remove constraints on parent attributes > (consider <dragstate>). Which brings us full circle to the origin of the > `with (this)` problem... > > If we took this proposal, constraints in states would have to be written > with explicit `this.`s in all the right places. I don't think we can make > that huge change. > > > On 2009-09-30, at 13:06, Henry Minsky wrote: > > I vote for Tucker's proposal (a year late !). Perhaps we can do this in >> time for 5.0. >> >> >> >> >> >> >> On Wed, Sep 30, 2009 at 12:59 PM, André Bargull <[email protected] >> >wrote: >> >> Methods in states are a common nuisance: >>> >>> http://www.openlaszlo.org/jira/browse/LPP-4061 >>> http://www.openlaszlo.org/jira/browse/LPP-7383 >>> http://www.openlaszlo.org/pipermail/laszlo-user/2008-July/006900.html >>> >>> >>> On 9/30/2009 6:45 PM, Henry Minsky wrote: >>> >>> I suppose we should have laid down the law and said not to let people >>>> put >>>> methods in states.. >>>> >>>> On Wed, Sep 30, 2009 at 12:14 PM, P T Withington <[email protected]<mailto: >>>> [email protected]>> wrote: >>>> >>>> This is for the extremely obscure case of a method in a state or >>>> dataset -- those methods really have to go into the parent node. >>>> I am not smart enough to make that transformation at compile >>>> time, so I compile it as a function using 'with (this)' and move >>>> it at runtime (when the state/dataset is instantiated). >>>> >>>> If you move the with(this) outside of the try/catch, does it work? >>>> That's not completely correct, but it would be one thing I could >>>> try. >>>> >>>> >>>> On 2009-09-30, at 11:59, Henry Minsky wrote: >>>> >>>> Why do we have the "with (this) ..." in the function body? >>>> >>>> On Wed, Sep 30, 2009 at 9:05 AM, P T Withington <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> Thanks! I guess you are going to win another T-shirt. >>>> >>>> Now to see if there is some way I can work around this... >>>> >>>> >>>> On 2009-09-30, at 08:56, Henry Minsky wrote: >>>> >>>> I filed a bug with Adobe as >>>> https://bugs.adobe.com/jira/browse/ASC-3849 >>>> >>>> >>>> >>>> >>>> On Wed, Sep 30, 2009 at 12:13 AM, Henry Minsky >>>> <[email protected] >>>> <mailto:[email protected]> >>>> >>>> wrote: >>>> >>>> >>>> Here's the test case, it looks like the return out of >>>> the "with (this)" >>>> >>>> is >>>> screwing up the flex runtime >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- Henry Minsky >>>> Software Architect >>>> [email protected] <mailto:[email protected]> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Henry Minsky >>>> Software Architect >>>> [email protected] <mailto:[email protected]> >>>> >>>> >>>> >> >> -- >> Henry Minsky >> Software Architect >> [email protected] >> > > -- Henry Minsky Software Architect [email protected]
_______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
