Page 3 of 3 First 123
  1. #21
    @Moon Wizard:

    I just noticed this... Seems a bit redundant, yes?
    Code:
    function setStringValue(srcval)
      if type(srcval) ~= "string" then
        return;
      end
    
      if srcnode then    
        if srcnodetype == "number" then
          if srcnode then
            local nMatch = nBaseIndex;
            for k, v in pairs(values) do
              if v == srcval then
                nMatch = k;
              end
            end
            srcnode.setValue(nMatch);
          end
        else
          if srcnode then
            srcnode.setValue(srcval);

  2. #22
    The setIndex function has never enforced that the value passed is in the range specified by the number of icons on the control. Enforcing the value in this script is not necessary, and technically the number database node doesn’t care. This is true whether it is set by this template code, or by another script. As long as the code displays the default icon when that happens, it’s working as expected.

    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in