Starfinder Playlist
  1. #1
    Xarxus's Avatar
    Join Date
    Mar 2019
    Location
    Rome (Italy)
    Posts
    253

    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?
    Last edited by Xarxus; January 6th, 2023 at 13:26.
    FGU ULTIMATE License
    Click here for RPG Music or here for Dwarves songs on Spotify

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    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!

  3. #3
    Xarxus's Avatar
    Join Date
    Mar 2019
    Location
    Rome (Italy)
    Posts
    253
    Sigh, so the only way is not layering and rewrite all
    FGU ULTIMATE License
    Click here for RPG Music or here for Dwarves songs on Spotify

  4. #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

  5. #5
    Xarxus's Avatar
    Join Date
    Mar 2019
    Location
    Rome (Italy)
    Posts
    253
    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?
    FGU ULTIMATE License
    Click here for RPG Music or here for Dwarves songs on Spotify

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
  •  
FG Spreadshirt Swag

Log in

Log in