function to check a property?

Home Forums General Programming function to check a property?

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #72984
    human fly
    Participant
      • Topics: 124
      • Replies: 1070
      • Total: 1194
      • ★★★★

      i need a little function to include in a method that
      checks a property on a modulator/component – in order to determine
      a page selection on a uiTabs. in this case, it’s the ‘button text
      off colour’ that i want to check.

      so i’m trying this: (and it is crashing the method it is called in)

      function checkParamPage()
      
      	paramA = panel:getComponent("paramAclick")	--:setProperty("uiButtonTextColourOff","FF00FF00", false)
      
      	if 	paramA:getProperty("uiButtonTextColourOff","FF00FF00", false) == true 
      	then
      	testLed = panel:getComponent("testLed"):setProperty("uiButtonTextColourOff","FF00FF00", false)
      	else 
      	testLed = panel:getComponent("testLed"):setProperty("uiButtonTextColourOff","FF0E2B01", false)	
      	end
      end

      so i think i am either not defining variables to be used after the
      function name, or including or missing something with getProperty.
      tried it also as (mod, value)

      #72985
      human fly
      Participant
        • Topics: 124
        • Replies: 1070
        • Total: 1194
        • ★★★★

        what are:
        CtrlrLuaObject const& and Identifier const& ?

        callback error message:

        var const& getProperty(CtrlrLuaObject const&,Identifier const&)

        https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrModulator/CtrlrModulator.h

        not sure what this is telling me:
        const var getProperty (const Identifier& name, const var &defaultReturnValue) const

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The forum ‘Programming’ is closed to new topics and replies.
      There is currently 0 users and 76 guests online
      No users are currently active
      Forum Statistics
      Threads: 2,495, Posts: 17,374, Members: 77,605
      Most users ever online was 12 on January 22, 2019 3:47 pm
      Ctrlr