I think here is an example, the problem is a method defined on a view, not a
class,

        <view name="menucap" y="${parent._currentattachy == 'top'? -height +
1:parent.height }"...
...
...
            <method name="setY" args="y"> <![CDATA[
                super.setY(y);
                if ( y < 0 ) {
                    this.setResourceNumber(1);
                } else {
                    this.setResourceNumber(2);
                }
             ]]>

generates a function expression in a hash table, with the "override" keyword
just hanging in there in the attrs list, causing a parser error



}, setY:  override function setY(  y) {


So we need to suppress this on methods that are declared on views. Although
in this case we're screwed because
it calls super.setY, so we really need to make this a singleton class...


On Fri, Mar 28, 2008 at 12:53 PM, Henry Minsky <[EMAIL PROTECTED]>
wrote:

> oops, there seems to be a bug, when I compile smokecheck, or some of the
> demos I get
>
> Compiling: test/smoke/smokecheck.lzx to test/smoke/smokecheck.lzr=swf8.swf
> Compilation errors occurred:
> debugger/newcontent.lzx:122:19: Syntax error: the token "function" was not
> expected at this position.
>
> So I need to examine what is being fed to the script compiler, I think
> this error is happening
> during the parsing of the javascript.
>
> On Fri, Mar 28, 2008 at 12:43 PM, P T Withington <[EMAIL PROTECTED]>
> wrote:
>
> > I'll have a look at this around 3, maybe Don can look sooner, but I'd
> > smokecheck still runs in dhtml, why don't you check it in.
> >
> > On Mar 28, 2008, at 12:02, Henry Minsky <[EMAIL PROTECTED]> wrote:
> >
> > > Change 20080328-hqm-S by [EMAIL PROTECTED] on 2008-03-28 11:59:21
> > > EDT
> > >    in /Users/hqm/openlaszlo/trunk4
> > >    for http://svn.openlaszlo.org/openlaszlo/trunk
> > >
> > > Summary: check if override needed on method declarations in classes
> > >
> > > New Features:
> > >
> > > Bugs Fixed:
> > >
> > > Technical Reviewer: ptw (pending)
> > > QA Reviewer: (pending)
> > > Doc Reviewer: (pending)
> > >
> > > Documentation:
> > >
> > > Release Notes:
> > >
> > > Details:
> > >
> > >
> > > Tests:
> > >
> > > <canvas width="1000" height="600" bgcolor="#eeeeff">
> > >  <class name="foobar" >
> > >    <handler name="onclick">
> > >      this.b1.animate("x", -50, 1000, true);
> > >      this.b3.animate("x", 50, 1000, true);
> > >    </handler>
> > >    <view name="b1" width="50" height="50" bgcolor='red'/>
> > >    <view name="b2" x="60" width="50" height="50" bgcolor='yellow'/>
> > >    <view name="b3" x="120" width="50" height="50" bgcolor='blue'/>
> > >    <method name="doit">
> > >      lzconsole.write('foobar.doit()');
> > >    </method>
> > >  </class>
> > >
> > >  <text>3 &lt;foobar&gt;</text>
> > >  <foobar id="f1" x="100"/>
> > >  <foobar id="f2" x="200" y="60"/>
> > >  <foobar x="300" y="120"/>
> > >
> > >  <class name="baz" extends="foobar">
> > >    <method name="doit">
> > >      lzconsole.write('baz.doit()');
> > >    </method>
> > >
> > >  </class>
> > >
> > >  <text y="200" >3 &lt;baz&gt;</text>
> > >  <baz id="b1" x="100" y="200"/>
> > >  <baz x="200" y="260"/>
> > >  <baz x="300" y="320"/>
> > >
> > >
> > > </canvas>
> > >
> > > should compile without error, and you
> > > can call f1.doit(), b1.doit() from the debugger
> > >
> > > Files:
> > > M      test/compiler_errors/override-builtin.lzx
> > > M      WEB-INF/lps/schema/lfc.lzx
> > > M      WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java
> > > M      WEB-INF/lps/server/src/org/openlaszlo/compiler/
> > > ClassCompiler.java
> > > M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
> > > M      WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
> > > M      WEB-INF/lps/server/src/org/openlaszlo/compiler/
> > > AttributeSpec.java
> > >
> > >
> > > Changeset:
> > http://svn.openlaszlo.org/openlaszlo/patches/20080328-hqm-S.tar
> >
>
>
>
> --
> Henry Minsky
> Software Architect
> [EMAIL PROTECTED]
>
>


-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to