FG Spreadshirt Swag
  1. #1

    Retrieve GUI element from DB node

    It is probably a simple question, but I can't figure out how to do it anymore.

    I know how to go from the GUI element to the DB node, just a matter of calling getDatabaseNode().

    But how do I go back from the node to the GUI element?

    In particular, I am trying to fix my extension after the recent FG update and I need to go from database node { charsheet.id-00001.powers.id-00001 } to the <windowclass name="power_item">.

    Thank you in advance!

  2. #2
    You cannot retrieve a UI element from a database node. You can only go in the other direction, as the relationship for databasenodes to controls is one to many.

    You'll have to perform the modifications in the scripts for the windowclass or controls that you need to act differently.

    Regards,
    JPG

  3. #3
    Thank you, that is what I was afraid of.

    Is it, maybe, possible to grab control using Interface.findWindow, or will this also not work?

  4. #4
    You can do that, but that means you have to grab the top-level window and drill all the way down to the correct control through all the subwindows and lists. I wouldn't suggest it for long term, since it would be more likely to break than other parts of the code.

    What are you trying to do?

    Regards,
    JPG

  5. #5
    Thank you for the clarification.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in