migrationopenlaszlolzx

Any idea when this error will come in Open Laszlo?


I am currently migrating an application from open laszlo from 3.3 to 5.0. I encountered this error in one of the classes.

line unknown: Error: A conflict exists with inherited definition $lzc$class_xxx.$datapath in namespace public, in line: var $classrootdepth;var $datapath;function $lzc$class__mjb ($0:LzNode? = null, $1:Object? = null, $2:Array? = null, $3:Boolean = false) {

In that particular class i have the datapath tag if i remove that then i am not getting this error.

Can anyone tell me why this error is occuring?


Solution

  • I managed to reproduce the error message using this code:

    <canvas debug="true">
    
      <class name="c1" extends="node">
        <datapath />
      </class>
    
      <class name="c2" extends="c1">
        <datapath />
      </class>
    
    </canvas>
    

    Looking into JIRA, I saw that it is filed as a bug already: LPP-9747 - SWF10: Explicit <datapath> declarations in class definitions lead to compiler error

    There seems to be a relatively high number of bugs or cases, where the compiler spits out error messages or exceptions which are hard to understand - especially when upgrading 3.x or 4.0/4.1 applications to versions of OpenLaszlo with SWF10+ runtime support. That's very unfortunate, since it easily gives the impression that the compiler is buggy.

    When you use the datapath tag within instances of <c1> and <c2>, the compiler does not report any error messages, e.g.:

    <canvas>
    
      <class name="c1" extends="node">
      </class>
    
      <class name="c2" extends="c1">
      </class>
    
      <c1>
        <datapath/>
        <c2>
          <datapath />
        </c2>
      </c1>
    
    </canvas>