I don't see what is malformed about the interface declaration.  What is the 
Flex compiler complaining about?  We know it handles mixins declared in JS in 
the LFC.

On 2009-12-05, at 09:23, Henry Minsky wrote:

> OK, well, if I output just
> 
> "dynamic mixin foo { }" then the swf10 compiler feels like it has to make an
> interface for it, and
> the code it puts out isn't
> really well formed, so it barfs.
> 
> e.g., if I have a declared mixin
> 
>   <mixin name="boxmodel">
>       <attribute name="margin" type="number" value="0"/>
> 
>       <setter name="margin" args="margin">
>           Debug.warn('set_margin', margin, this);
>       </setter>
>   </mixin>
> 
> that eventually turns into a ScriptClass which is
> 
> mixin $lzc$class_boxmodel
> and that gets converted by the swf10 backend into a .as file
> 
> package {
> dynamic interface $lzc$class_boxmodel {
> }
> }
> 
> So do we need to stop the swf10 generator from outputting anything at all
> for the mixin case?
> 
> 
> On Sat, Dec 5, 2009 at 5:51 AM, P T Withington <[email protected]> wrote:
> 
>> Right now we don't support mixins extending anything. See what happens if
>> you suppress the 'extends' clause when you output a mixin?
>> 
>> On Dec 5, 2009, at 1:11, Henry Minsky <[email protected]> wrote:
>> 
>> 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]>
>> [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]>
>>> [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>
>>> 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>
>>> http://svn.openlaszlo.org/openlaszlo/patches/20091204-hqm-g.tar
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Laszlo-reviews mailing list
>>>>>> <[email protected]>[email protected]
>>>>>> <http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews>
>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> Henry Minsky
>>>> Software Architect
>>>> <[email protected]>[email protected]
>>> 
>>> 
>> 
>> 
>> --
>> Henry Minsky
>> Software Architect
>> <[email protected]>[email protected]
>> 
>> 
>> _______________________________________________
>> Laszlo-reviews mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
>> 
>> 
> 
> 
> -- 
> Henry Minsky
> Software Architect
> [email protected]


_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to