Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Strange behavior caused by international characters

rksrks
edited September 2012 in Bugs Posts: 3

I have a project with 10+ classes and 1000+ lines of code. Without any reason I could figure out Codea stopped recognizing one of the classes as a class. When I try to call any of the functions in the class, the class name gets treated as a variable i.e. an error about trying to index a global variable.

Since I wrote the above I found an international character (รค = a with dots) accidentally typed at the end of a line of code in the class tab. After removing the character, the class was again recognized as a class. However the particular function with the character would not function any more. I tried cutting and pasting it back. I removed the function and retyped it. I renamed it. Nothing seems to help. Any calls to that particular function in the class structure are interpreted as calls to a field of nil value.

The class that had the erroneus character is the root class for some subclasses. Now it seems that the subclasses "lost an internal link" to the particular function in the root class.

I have also tried to duplicate the project, but with little success.

Any ideas?

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,446

    .@rks Lua doesn't support non-ascii characters (in code, they should be okay in comments and strings).

    But your state error sounds like it might be something else. If you move that base class (and only that base class) into a new project and subclass it, does that work?

  • rksrks
    Posts: 3

    I moved the base class to a new project, created a new subclass and it worked.

    I will next try to move all the tabs one by one.

    It appears that this all started from the non-ascii character as removing it returned the base class to class status in the original project, but left the subclasses corrupted.

  • rksrks
    Posts: 3

    By copying all the tabs one by one I managed to rebuild a functional project.

    Thanks for the help!

  • Simeon, I recently made something this morning using the Pi symbol in a string. Very slowly all the code below the Pi symbol begins to float out of place. I substituted with Pi for now to make my code readable to the human eye.

  • SimeonSimeon Admin Mod
    Posts: 5,446

    .@smile4awile this will be fixed in the next version, sorry about the bug with special characters.

Sign In or Register to comment.