DICE PACKS BUNDLE
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    5E number_abilityscores.lua / update(bool) question

    In 5E's number_abilityscore.lua file there is the following:


    function onInit()
    super.onInit();
    onValueChanged();
    end

    function update(bReadOnly)
    setReadOnly(bReadOnly);
    end

    function onValueChanged()
    ...


    What is the use for update(true/false)?
    It appears it is to setReadOnly. What is that used for? Is there a scenario where in 5e it locks a number field or unlocks it programmatically?


    (I tried searching on "update(" i my eclipse but hit too many things. Using the lua perspective doesn't help as references menu option never works for me in eclipse, it just says "... please select a valid Lua element name" - so figured ask versus read it ALL )

  2. #2

  3. #3
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    I’m not by the computer, I’ll check in but - I get that dara may be locked/unlocked, what confused me is how does this apply to number_abilityscore?

    Not to mention, why go through the trouble of adding a function “update(bool)” that calls “setReadonky(bool)” when it appears to me to be doing no “value add”. It isnt intercepting setReadOnlyband decorating it - it isn’t making something public that was private it isn’t IMPROVING the naming the original setReadOnly(book) says it all much more clearly without needing to look at the method.

    PS - If it is some way to set my ability scores to read only - I’ll probably use it, I’ve been known to accidentally mess stuff up due to mouse keybinds while playing.

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
  •  
Starfinder Playlist

Log in

Log in