DICE PACKS BUNDLE
  1. #1

    Question regarding "bReadOnly"

    Hi there,
    I noticed that in "record_quest" we run this code
    Code:
    			function update()
    				super.update();
    
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
    				cr.setReadOnly(bReadOnly);
    				xp.setReadOnly(bReadOnly);
    			end
    while in "record_skill" we run this more advanced code
    Code:
    			function onInit()
    				self.update();
    			end
    			function update()
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode())
    				local tFields = { "stat", "text", };
    				WindowManager.callSafeControlsUpdate(self, tFields, bReadOnly);
    			end
    Any particular reason why the same code isn't used?

  2. #2
    For which ruleset? Off the top of my head from looking at the snippet, one is calling a deeper update function call while the other is just running the update at that particular level. You see this with merged controls.
    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

  3. #3

  4. #4
    Then yes, it would mean super.update() is calling a layered update call. This runs that code instead of simply overwriting it with the current update call.
    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

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •  
Cosmere RPG Beta Launch

Log in

Log in