Thread: Variable visibility
-
January 6th, 2023, 13:17 #1
Variable visibility
I'm trying to add functions to the combobox handling defined in CoreRPG. I defined a template, based on combobox tag, to which I added a script.
From what I see I can override a function with a new one, calling the CoreRPG one using "super.[function name]".
It's not clear to me if I can do the same with variables.
Is there any way by new code to access the value of (for example) _bActive defined in the CoreRPG code?
-
January 6th, 2023, 15:09 #2
Any variables that are defined as local can only be accessed in the script scope where they are defined. You can't use super._bActive as _bActive is defined as local
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!
-
January 6th, 2023, 15:29 #3
-
January 6th, 2023, 15:45 #4
Most of those controls are in a state where a rewrite is the goal since the control has a very specific purpose through the rulesets that use it. Ones that can be expanded usually have a get function that will retrieve certain local variables. I have played with this template quite a bit and expanding it might be better served with a whole new template to your specific use. What is the use of your custom combobox?
Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
January 6th, 2023, 17:27 #5
There are two things I would like to address.
The first is the ability to distinguish equal values with different keys (for example two professions with the same name coming from different modules). The second aspect is the graphic one: I'd like to be able to change the appearance depending on whether it's selected or not, or whether it's readonly. I would like to be able to intervene also on the appearance of the list without having to have a specific control for each occasion (color of the frame, font, etc.)
But I already know that by rewriting it, other needs will come to mind.
If you have any suggestions, please let me know. For example, do you know if there is any other code I should study?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks