-
May 16th, 2020, 01:51 #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."
-
May 16th, 2020, 03:02 #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?
-
May 18th, 2020, 09:15 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
Button controls are not data-bound, whereas button fields are data-bound.
Regards,
JPG
-
May 18th, 2020, 14:45 #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.
-
May 18th, 2020, 23:32 #5
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
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
-
May 18th, 2020, 23:39 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
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)
Bookmarks