Heya, was wondering if someone could help me…im trying to merge the example “dynamic_building_matrix” from the “example_gui” tool from the xrnx starter kit into the “create tool” tool …i havnt changed anything apart from the strings in variable “note_strings” and the amount of rows & columns…there is something i am obviously missing an understanding of as when i cntrl + save + reload tool all im getting is an >>
[details=“Click to view contents”] *** No matching overload found, candidates:
*** custom [class Dialog] show_custom_dialog(Application const&,custom [class String] const&,View*,luabind::object const&,lua_State*)
*** custom [class Dialog] show_custom_dialog(Application const&,custom [class String] const&,View*,lua_State*)
*** stack traceback:
*** [C]: in function ‘show_custom_dialog’
*** main.lua:86: in main chunk [/details]
if anyone has the time to look over this and tell me where im going wrong id be very grateful… [details=“Click to view contents”]
–[[============================================================================
main.lua
============================================================================]]–
– Placeholder for the dialog
local dialog = nil
– Placeholder to expose the ViewBuilder outside the show_dialog() function
local vb = nil
– Reload the script whenever this file is saved.
– Additionally, execute the attached function.
_AUTO_RELOAD_DEBUG = function()
end
– Read from the manifest.xml file.
class “RenoiseScriptingTool” (renoise.Document.DocumentNode)
function RenoiseScriptingTool:__init()
renoise.Document.DocumentNode.__init(self)
self:add_property(“Name”, “Untitled Tool”)
self:add_property(“Id”, “Unknown Id”)
end
local manifest = RenoiseScriptingTool()
local ok,err = manifest:load_from(“manifest.xml”)
local tool_name = manifest:property(“Name”).value
local tool_id = manifest:property(“Id”).value
– Main functions
– This example function is called from the GUI below.
– It will return a random string. The GUI function displays
– that string in a dialog.
– GUI
function dynamic_building_matrix()
local vb = renoise.ViewBuilder()
local CONTENT_MARGIN = renoise.ViewBuilder.DEFAULT_CONTROL_MARGIN
local BUTTON_WIDTH = 2*renoise.ViewBuilder.DEFAULT_CONTROL_HEIGHT
local NUM_OCTAVES = 4
local NUM_NOTES = 1
local note_strings = {
“1/32”, “1/16”, “1/8”, “1/4”
}
– create the main content column, but don’t add any views yet:
local dialog_content = vb:column {
margin = CONTENT_MARGIN
}
for octave = 1,NUM_OCTAVES do
– create a row for each octave
local octave_row = vb:row {}
for note = 1,NUM_NOTES do
local note_button = vb:button {
width = BUTTON_WIDTH,
text = note_strings[note]…tostring(octave - 1),
notifier = function()
– functions do memorize all values in the scope they are
– nested in (upvalues), so we can simply access the note and
– octave from the loop here:
show_status((“note_button %s%d got pressed”):format(
note_strings[note], octave - 1))
end
}
– add the button by “hand” into the octave_row
octave_row:add_child(note_button)
end
dialog_content:add_child(octave_row)
end
renoise.app():show_custom_dialog(dialog_content)
end
– Menu entries
–[[
renoise.tool():add_menu_entry {
name = “Main Menu:Tools:”…tool_name…"…",
invoke = show_dialog
}
–]]
– Key Binding
–[[
renoise.tool():add_keybinding {
name = “Global:Tools:” … tool_name…"…",
invoke = show_dialog
}
–]]
– MIDI Mapping
–[[
renoise.tool():add_midi_mapping {
name = tool_id…":Show Dialog…",
invoke = show_dialog
}
–]] [/details]