Reply To: Unable to Install/Run Ctrlr AU plugin

Home Forums Platform Specific OSX Unable to Install/Run Ctrlr AU plugin Reply To: Unable to Install/Run Ctrlr AU plugin

#17573
atom
Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I’ll quickly post an example of what i mean:

    Assuming that you have a lua method that pops up a dialog called myMethod, you attach it to a button on the panel, it will open that dialog whenever you open the instance or load the panel, there are 2 methods available to check what state Ctrlr is in (bootstrap state and program state), you need to check both to know 100% you can display any dialogs, below i wrapped that check into one simple method called “isReady” and used that, this should only open the dialog when someone clicks on the button.

    myMethod = function(mod, value)
    	if isReady() then
    		utils.infoWindow ("Title", "Info")
    	end
    end
    
    isReady = function()
    	if panel:getBootstrapState() == false and panel:getProgramState() == false then
    		return (true)
    	else
    		return (false)
    	end
    end
    Ctrlr