Home › Forums › General › Programming › How does Ctrlr decide where to put content?
- This topic has 0 replies, 1 voice, and was last updated 3 years, 11 months ago by shooking.
-
AuthorPosts
-
May 7, 2020 at 11:15 pm #118221
PRIMARY QUESTION
I can also see Crtlr is stashing stuff in “roaming” profile.
Is there any way to constrain where the content is written?
I am more than a little confused about how to distribute my panel. Does the bzpanel package everything?
WHY I AM ASKING THIS QUESTION
So I had a catastrophic panel failure recently – seemed to lose a lot of my Lua code.
Reading thru the forums I can see I am neither the first not the last.Sure, I understand now that using 5.x is better than using 6.x
I used a LUA Editor function to extract source.
Wrote some Linux commands to compare the different files and found my best working set.Then I merged them into a directory, opened them up in editor and started to go thru the task of either cutting and pasting the newer content in or creating a new file.
Hmmh … a LOT of my file content had come back… but I didnt do anything to deserve this honest.
A check under the hood an panel has content like this
<luaMethodGroup name="Global" uuid="b3219ab5e982443f8fb96e480d99fa7d"> <luaMethod luaMethodName="afterLoadSetGlobals" luaMethodSourcePath="afterLoadSetGlobals.lua" luaMethodSource="1" uuid="0a1507d2462b424abd79572627a64c82" luaMethodValid="1"/> <luaMethod luaMethodName="debugConsole" luaMethodSourcePath="debugConsole.lua" luaMethodSource="1" uuid="2b44d6fb272d412c882e67f7386b5dc3" luaMethodValid="1"/> <luaMethod luaMethodName="setupGlobalArray" luaMethodSourcePath="setupGlobalArray.lua" luaMethodSource="1" uuid="e3a0527663ea49bea3e27040da0e8e9f" luaMethodValid="1"/> <luaMethod luaMethodName="addDelay" luaMethodCode="-- delay in s function addDelay(n) local t = os.clock() while os.clock() - t <= n do -- nothing end end" luaMethodLinkedProperty="" luaMethodSource="0" uuid="0451bdd755df4ca9b60b2f1309e78f8e" luaMethodValid="1"/> <luaMethod luaMethodName="addDelayMS" luaMethodCode="function addDelayMS(n) os.execute(sleep(n)) end" luaMethodLinkedProperty="" luaMethodSource="0" uuid="fe75bc256d54455ba1b8d1db1bc4ff76" luaMethodValid="1"/> <luaMethod luaMethodName="usefulHints" luaMethodCode="function usefulHints() 	-- Your method code here --[[ Massive comment block Store useful tips from forum - never know when you need them L - if text comes back from some operations L it. >>> console(""..L(panel:getPropertyString("panelMidiOutputChannelDevice"))) 1 >>> console(""..L(panel:getPropertyString("panelMidiOutputChannelDevice"))) 10 >>> console(""..L(panel:getPropertyString("panelMidiInputChannelDevice"))) 8 >>> console(""..L(panel:getPropertyString("panelMidiControllerChannelDevice"))) 1 >>> console(""..L(panel:getPropertyString("panelMidiInputDevice"))) Midex8 2 >>> console(""..L(panel:getPropertyString("panelMidiOutputDevice"))) Midex8 2 >>> console(""..L(panel:getPropertyString("panelMidiControllerDevice"))) Midex8 4 multiTab use this to determine which tab, and hence whether to write multi or single. panel:getModulatorByName ("multiTab"):getModulatorValue() panel:getModulatorByName ("multiTab"):setModulatorValue(vvv, false, false, false) comp:setPropertyString("uiLabelText", "Load All..") panel:getModulatorByName ("multiTab"):setModulatorValue(vvv, false, false, false) comp:getOwner():getModulatorValue() https://ctrlr.org/forums/topic/ctrlrluautils/ perfName = utils.askForTextInputWindow("Performance Name","","Grand Piano","New name:",false,"OK","Cancel") https://ctrlr.org/forums/topic/multiple-midi-ports/ !"#$%&'() !"#$%&'() function resetMIDIdevice() 	-- Trick to avoid doubled MIDI messages 	local sMIDIDeviceName=panel:getProperty("panelMidiOutputDevice") 	panel:setPropertyString("panelMidiOutputDevice","-- None") 	panel:setPropertyString("panelMidiOutputDevice",sMIDIDeviceName) 	local sMIDIDeviceName=panel:getProperty("panelMidiControllerDevice") 	panel:setPropertyString("panelMidiControllerDevice","-- None") 	panel:setPropertyString("panelMidiControllerDevice",sMIDIDeviceName) 	local sMIDIDeviceName=panel:getProperty("panelMidiInputDevice") 	panel:setPropertyString("panelMidiInputDevice","-- None") 	panel:setPropertyString("panelMidiInputDevice",sMIDIDeviceName) 		 end --]] end" luaMethodLinkedProperty="" luaMethodSource="0" uuid="4909f19f7125475b9f6907b468952972" luaMethodValid="1"/>
I didnt ask for the content to be put in C. My panel is rooted in F:\
And many of the Lua methods in my panel XML are no external rather than internal to the panel … ??? -
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.