Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Reserved property name conflict

  • Reserved property name conflict

    Posted by Dario L. on February 19, 2025 at 11:55 am

    Hello,
    I’m currently working on a simple Word Automation project that generates a docx file. Everything is working fine, however I’m encountenring an annoying problem regarding access to the $name property of the Word.Application object that is being returned (in my case it’s the name of a document bookmark).

    As you may have already guessed, the $name is a reserved Omnis keyword, and when i use lObject.$name, it returrns “lObject”, instead of the actual value of the $name variable.

    I’ve tried using lObject.$name(), lObject().$name and lObject.//$name//, but none is working unfortunately. Any help would be greatly appreciated.

    PS: I’m using Omnis 8.1.7 (can’t update atm)

    Thanks in advance.

    Diego Mendoza Muñoz replied 5 months ago 3 Members · 4 Replies
  • 4 Replies
  • Silvan Baach

    Member
    February 19, 2025 at 12:05 pm

    Hi Dario

    Try using lObject.$::name

    This tells Omnis not to call the internal property

    • Dario L.

      Member
      February 20, 2025 at 8:15 am

      @Silvan That did the trick! Thanks a lot 🙂

      @Diego Mendoza Muñoz I didn’t know about that, that’s really interesting! Thanks to you too for this useful tip

  • Diego Mendoza Muñoz

    Member
    February 19, 2025 at 11:31 pm

    It may not be answering your question, but this contribution may help you.

    Omnis has an interesting way of working with reserved names try this.

    Create a function on the window or some object and add the $customProp method and then add $customProp.$assign

    Then you can access the calculate function by directly calling the function. I will send you photos so you can understand better.

    The notation in fat client is super powerful but there are not enough examples to fully understand it, each one has to discover.

  • Diego Mendoza Muñoz

    Member
    February 27, 2025 at 10:16 pm

    look at this in this library I built a window with complex functions that use full notation.could be something interesting

    https://www.omnis.net/community/forums/forum/discussion/contribution-to-the-community-comment/

Log in to reply.