I need some help in hacking the script compiler back end to understand
"mixin".

Currently we're passing the follwing values for 'kind' from ClassModel,

mixin
class
instance class
anonymous

If I just emit "class" for everything except "mixin", something in the DHTML
backend stil
chokes on "mixin":

"dynamic mixin $lzc$class_testmixin extends LzView "

compiles to something which causes a runtime error.

     [exec] js: "lps/includes/lfc/LFCdhtml-debug.js", line 298: uncaught
JavaScript runtime exception: TypeError: Cannot find function make in object

     [exec] function () {
     [exec]     this.constructor = arguments.callee;
     [exec]     if (this.$lzsc$initialize !==
Instance.prototype.$lzsc$initialize) {
     [exec]         this.$lzsc$initialize.apply(this, arguments);
     [exec]     }
     [exec] }
     [exec] .
     [exec]     at lps/includes/lfc/LFCdhtml-debug.js:298
     [exec]     at test/lztest/lztest-mixins.js:153
     [exec]     at tmp/test_lztest_lztest-mixins.js:99






On Fri, Dec 4, 2009 at 6:03 PM, P T Withington <[email protected]>wrote:

> On 2009-12-04, at 17:47, Henry Minsky wrote:
>
> > On Fri, Dec 4, 2009 at 5:41 PM, P T Withington <[email protected]
> >wrote:
> >
> >> I don't see in ScriptClass that it is using `kind` in toString.  Is the
> >> changeset up to date?
> >>
> >
> > So for the ScriptClass.toString method , should I only output a non-empty
> > string if it's a "class" kind  , or just pass
> > along any class/mixin/interface to the script compiler
>
> Where toString has the literal "class" use the variable `kind` instead, and
> let the script compiler sort it out.
>
> "dynamic class" + ...
>
> =>
>
> "dynamic " + kind + ...
>
>
> >
> >>
> >> It seems that you should not need to make a copy of the element children
> in
> >> ViewCompiler (nor in ClassCompiler), since you're not munging the DOM in
> >> ClassModel any more.
> >>
> >
> > oh yeah..
> >
> >
> >>
> >> So, not quite approved yet...
> >>
> >> On 2009-12-04, at 17:31, Henry Minsky wrote:
> >>
> >>>
> >>> really passes smokecheck now, in swf8,swf10, and dhtml
> >>>
> >>>
> >>> Change 20091204-hqm-g by [email protected] on 2009-12-04 10:17:09 EST
> >>>   in /Users/hqm/openlaszlo/trunk6
> >>>   for http://svn.openlaszlo.org/openlaszlo/trunk
> >>>
> >>> Summary: fix for  instance-mixin fails for non-top-level instance
> >>>
> >>> New Features:
> >>>
> >>> Bugs Fixed: LPP-8654  instance-mixin fails for non-top-level instance
> >>>
> >>> Technical Reviewer: ptw
> >>> QA Reviewer: max
> >>> Doc Reviewer: (pending)
> >>>
> >>> Documentation:
> >>>
> >>> Release Notes:
> >>>
> >>> Overview:
> >>>
> >>>
> >>> Details:
> >>>
> >>> + ViewCompiler: updateSchema recursively map over child elements
> >>>
> >>> + ClassModel: remove code in ClassModel that inserted a classdef into
> the
> >> DOM.
> >>>
> >>> + ScriptClass: added a "kind" field
> >>>
> >>> + updated lztest smoke check for mixins to have non-toplevel node with
> >> mixin
> >>>
> >>> Tests:
> >>>
> >>> test case from bug
> >>> test/mixins.lzx
> >>> smokecheck
> >>> test/smoke/mixin-simple.lzx
> >>>
> >>>
> >>> Files:
> >>> M       test/lztest/lztest-mixins.lzx
> >>> M       WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java
> >>> M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewCompiler.java
> >>> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
> >>>
> >>>
> >>> Changeset:
> >> http://svn.openlaszlo.org/openlaszlo/patches/20091204-hqm-g.tar
> >>>
> >>> _______________________________________________
> >>> Laszlo-reviews mailing list
> >>> [email protected]
> >>> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
> >>
> >>
> >
> >
> > --
> > 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

Reply via email to