Menu

#2186 Nasal runtime error: non-objects have no members

2020.1
Fixed
None
Low
2024-06-02
2020-01-24
No

Please, somebody what. does. this. message. mean ????

Does it mean:
1) It's an object with no members so should be a non-object
2) It's a non-object with members and it should be a non-object without members
3) It's a non-object with members and it should be an object with members
4) It's a non-object without members and it should be a non-object with members
5) None of the above, it's just a statement like: " Blind ducks have no shoes"

What's the non-object in question ? Nasal knows but why won't it tell me ?
Does Nasal see members ? What are they ?

Could the error message be made to mean something and specify the names of the things that are in error, please ?

Thks

Discussion

  • Slawek Mikula

    Slawek Mikula - 2020-01-24

    This message comes from the simgear/nasal/code.c code :) See tab above (Git) and select simgear, then simgear/nasal/code.c and there you go :)

    If you want correct answer you can look at the source code and find what conditions are not met when this message appears. It is not a bug in FG so if you want more and get a precise answer it is better to ask on the forum (http://forum.flightgear.org) or mailing list (see above tab with name "Mailing List" and apply for flighgear-devel list). Nonetheless it would be best when you post messages there to give more context (example code, environment, what you are doing) that is causing this message for you. I think it is a best solution.

     
  • James Turner

    James Turner - 2020-04-28

    Marking this as closed : unfortunately this is a programming problem. The message isn't great but it comes form deep inside the Nasal interepter, and at the point we generate it, we don't know the name of the object.

    What it's literally saying is 'you tried to use .foo' on a thing that isn't an object: eg if you did:
    var f = 42;
    print (f.foo); # you would get this error at this point

    But inside the engine, we have no way to know that the object is called 'f'. We might be able to print 'foo' at that time, not sure.

     
  • James Turner

    James Turner - 2020-04-28

    Actually we can report the name of the field: the get version already does this.

     
    • Frederic Türpe

      Frederic Türpe - 2024-06-02

      I guess you meant GIt version; it doesn't though.

       
  • James Turner

    James Turner - 2020-04-28
    • status: New --> Fixed
    • assigned_to: James Turner
    • Milestone: 2018.3.0 --> 2020.1
     
  • Huntley Palmer

    Huntley Palmer - 2020-04-28

    Many thanks. "No such member" says it all for me !

     

Log in to post a comment.