2

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?

raju-bitter
  • 8,906
  • 4
  • 42
  • 53
karthick
  • 11,998
  • 6
  • 56
  • 88
  • How does the datapath attribute definition look in your class? Looks like you are declaring a different type for the attribute. Can you post a small piece of code for testing? – raju-bitter Aug 17 '12 at 19:59
  • The error message is a Flex compiler error message, which is triggered when you re-declare a property in a class, which has already been declared on a superclass. http://stackoverflow.com/questions/2310961 – raju-bitter Aug 17 '12 at 21:43

1 Answers1

2

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>
raju-bitter
  • 8,906
  • 4
  • 42
  • 53
  • Sorry, i didn't see your post earlier. But my code is exactly like this only like this only. Is there any way to over come this? – karthick Aug 18 '12 at 15:09
  • I asked @ptwithy for help, he knows the compiler much better. If we are lucky, he'll respond... – raju-bitter Aug 18 '12 at 15:24
  • Thank you..In the mean while I'll try to incorporate this and see whether its working in my application. – karthick Aug 18 '12 at 15:29
  • I heard that the problem is relatively complex, since the datapath tags are handled differently from normal tags in OpenLaszlo. That means, there is currently no better solution than to add the datapath tags to instances, not to classes. – raju-bitter Aug 23 '12 at 22:12