I get a compiler error from this case:

<canvas>
  <class name="foo">
  <method name="delete">
    Debug.write('foo');
  </method>
  </class>
</canvas>



del.lzx:5:37: 'name' is a required attribute of <method> and must be a valid
identifier

can you send me a small test case where you get no compiler warning or
error?

On Wed, Sep 23, 2009 at 10:49 AM, Rami Ojares / AMG Oy <
[email protected]> wrote:

> Hi,
>
> Does anyone know why a method with name delete is ignored?
>
> I have a class with a method named delete:
>
> <class ...>
>   <method name="delete">
>   ...
>   </method>
> </class>
>
> When I go through it's attributes using:
> for (var name in instanceOfClass) ...
> the object does not contain function with that name
>
> But when I change the name to say delete1 then everything works as
> expected.
>
> Strange?
>
> ...
>
> Thinking for a while before sending I came to the conclusion that it must
> be because there exists a delete operator in javascript.
> So delete can not be a variable name because it is a reserved word.
> Compiler warning would be great in these kind of situations.
>
> - rami
>



-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to