PF2E Playlist
  1. #1

    Accessing a control from a suboordinate list entry

    My ct_entry window has a button control called npcoption and a windowlist control ct_weaponcombat. ct_weaponcombat has windowlist entries of class ct_weapon.

    ct_weapon has another button control called adjdx.

    Basically, I want a function in adjdx to set the value for npcoption. I have not been able to figure out how a control in a windowlist that is part of another window can "reach" a control in the windowlist's "grandparent."

  2. #2
    Further investigation: I am able to access the databaseNode bound to the aforementioned ct_entry window, but its children do not include npcoption, so apparently that control has not been bound to a databasenode itself?

  3. #3
    Button controls are not data-bound, whereas button fields are data-bound.

    Regards,
    JPG

  4. #4
    buttonfield vs. buttoncontrol!!!!! Aaaargh, so simple! And so missing from the documentation.

    Thank you - that little change worked after I spent literally hours trying to climb up and down the database tree, create event handlers, and various other hacks, when I could have just looked at some examples of buttonfields. But in my defense, this page is not even indexed in the main refdoc - in fact, I can't find a single reference to it anywhere in the API (which, btw, has no search function?) I found it by manually typing the word "buttonfield" in place of buttoncontrol, on a guess.

    I know I'm a noob at developing FG rulesets, but there are a lot of things the reference docs could do to make it easier to find stuff. For example, each control lists what it inherits from, but does not list things that inherit from it (i.e. its own "subclasses") which would have been really useful in several other instances.

  5. #5
    Interesting enough; the very short description page was built for old wiki API reference but didn't get added to side menu. I've added to the old wiki reference for now.

    I've asked Doug to add to the new wiki reference too.

    Thanks,
    JPG

  6. #6
    And Doug even improved the layout of the wiki reference page for us while he's working on it.
    https://fantasygroundsunity.atlassia...+API+Reference

    JPG

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in