-
February 28th, 2018, 04:46 #11
It is quite the challenge but this kinda thing sucks me in and makes me figure it out. Makes it easier down the road when I need to do it again... you are right tho the temporary node would make it a lot easier
You are correct. The way I figured it out was really kludgy but it worked.
So the first thing I did was call what I knew was valid from "ready_check_entry_user" in a <script> section like this.
function onButtonPress()
local sName = User.getUsername();
window.parentcontrol.readyPressed(sName,1);
end
Then at main_user I added another script section with the same code (the above is sent to main_user <script>)
function readyPressed(sUser,nCheck)
Debug.console("utility_readycheck.xml","main_user" ,"TESTING");
window.parentcontrol.readyPressed(sUser,nCheck);
end
and then in "main"
function readyPressed(sUser,nCheck)
Debug.console("utility_readycheck.xml","main","TES TING");
window.readyPressed(sUser,nCheck);
end
and then finally in readycheck I added the real "readyPressed(sUser,nCheck);
By the time I got to "main" I had figured out it was
window.parentcontrol.window.parentcontrol.window.r eadyPressed(sName,1);
It was kinda klunky but I eventually figured out the path. That whole backwards thing was confusing but I think next time I'll have a much better idea how to do it. Thanks all for the tips!Last edited by celestian; February 28th, 2018 at 15:58.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
February 28th, 2018, 15:53 #12
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Thanks for sharing, Celestian. You da man!
-
February 28th, 2018, 22:51 #13
Have you figured this out yet?
Oops nevermindLast edited by Minty23185Fresh; February 28th, 2018 at 22:53.
Current Projects:
Always...
Community Contributions:
Extensions: Bardic Inspiration, Druid Wild Shapes, Local Dice Tower, Library Field Filters
Tutorial Blog Series: "A Neophyte Tackles (coding) the FG Extension".
-
February 28th, 2018, 22:55 #14
Yep - it has been figured out. What I mentioned in post #9 was the solution.
You can't use control/windowclass actual names to go up from the bottom of a GUI hierarchy - you have to use referential names such as window and parentcontrol - because "window" doesn't return the top most window, it returns the current window the control code is in.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
March 1st, 2018, 00:50 #15---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks