error message

8086 myfirstoolhelp.png
when I click on the bitmap image I get that error message ?

attachicon.gifmyfirstoolhelp.png
when I click on the bitmap image I get that error message ?

It would be good if you shared the code, to be able to talk about it.

The line 95 is calling a variable named “show_status” that is not declared or defined previously.

Note that show_status() is a function of the renoise.app() class, so you must use a semicolon “:” to call the function itself, rather than a period “.” which you’d use when reading/writing basic properties.

Incorrectly using a period as if reading a property of the class:

renoise.app().show_status("This will never be seen!")

Correctly using a semicolon to access/call a function within the class:

renoise.app():show_status("Hello world!")

Perhaps something like this was to blame?

Would be much easier if we could see your code, as Raul already said :wink:

ok, this is very whacky then …

renoise.tool():add_menu_entry {
  name = "Main Menu:Tools:Available",
  invoke = function() available_controls() end 
}

function available_controls()

 -- now we create a dialog with all available controls (things that let the 
  -- user change "values"), so you get an idea how all the views look like, 
  -- which views to choose from when creating a new custom GUIs.
  --
  -- but one note about controls & "values" in general first: as you'll see 
  -- below, we do attach notifiers to the values of the controls. Notifiers are
  -- callback functions that are called as soon as the user changed the views 
  -- value through the GUI. To maintain something like an external state that
  -- you are going to use outside the view, make sure you do keep the views value
  -- and "your" value in sync.
  --
  -- here is a somple example on how to sync an external value with "your" value:
  --
  -- current_velocity = 0x7f -- used in other places like your processing functions
  --
  -- vb:slider {
  -- value = current_velocity, -- initialize the GUI with your value
  -- notifier = function(slider_value) -- update your value when the GUI changed
  -- current_velocity = slider_value
  -- end,
  -- min = 0,
  -- max = 0x7f
  -- }
  --
  -- there is another way of dealing with "values", which we will describe in the 
  -- next example more in detail. Basically you can also pass over an Observable 
  -- object to the view (not the raw number, boolen), which then will be used by 
  -- the view instead of its onw value. Any changes to this value can then tracked 
  -- outside of this view. This often is very useful to seperate the GUI code from
  -- the controller and data. Here is a simple example:
  --
  -- -- (the controller part of your script)
  -- options.current_velocity = 0x7f
  -- options.current_velocity.add_notifier(current_value_changed_function)
  
  -- -- (and the GUI)
  -- vb:slider {
  -- bind = options.current_velocity, -- only gets a reference passed
  -- min = 0,
  -- max = 0x7f
  -- }

  -- we memorize a reference to the dialog this time, to close it
  local control_example_dialog = nil
  
  local vb = renoise.ViewBuilder()
  
  local DIALOG_MARGIN = 
    renoise.ViewBuilder.DEFAULT_DIALOG_MARGIN
  
  local CONTENT_SPACING = 
    renoise.ViewBuilder.DEFAULT_CONTROL_SPACING
  
  local CONTENT_MARGIN = 
    renoise.ViewBuilder.DEFAULT_CONTROL_MARGIN
  
  local DEFAULT_CONTROL_HEIGHT = 
    renoise.ViewBuilder.DEFAULT_CONTROL_HEIGHT
  
  local DEFAULT_DIALOG_BUTTON_HEIGHT =
    renoise.ViewBuilder.DEFAULT_DIALOG_BUTTON_HEIGHT
  
  local DEFAULT_MINI_CONTROL_HEIGHT = 
    renoise.ViewBuilder.DEFAULT_MINI_CONTROL_HEIGHT
  
  local TEXT_ROW_WIDTH = 80

  ---- CONTROL ROWS
 

  
  -- bitmapview 
  local bitmapview_row = vb:row {
    vb:text {
      width = TEXT_ROW_WIDTH,
      text = "rægæ:bitmap"
    },
    vb:bitmap {
      -- recolor to match the GUI theme:
      mode = "body_color",
      -- bitmaps names should be specified with a relative path using
      -- your tool script bundle path as base:
      bitmap = "Bitmaps/RenoiseLua.bmp",
      notifier = function()
        show_status("bitmapview was pressed")
      end
    },
    --[[ TODO vb:bitmap {
      mode = "alpha",
      bitmap = "Bitmaps/RenoiseLua.png",
      notifier = function()
        show_status("bitmapview was pressed")
      end
    } ]]
  }
  

  

  
  -- close button
    
  local close_button_row = vb:horizontal_aligner {
    mode = "right",
    
    vb:button {
      text = "Close",
      width = 60,
      height = DEFAULT_DIALOG_BUTTON_HEIGHT,
      notifier = function()
        control_example_dialog:close()
      end,
    }
  }
    
    
  ---- MAIN CONTENT & LAYOUT
  
  local dialog_content = vb:column {
    margin = DIALOG_MARGIN,
    spacing = CONTENT_SPACING,
    
    vb:row{
      spacing = 4*CONTENT_SPACING,

      vb:column {
        spacing = CONTENT_SPACING,
        
       
      
        bitmapview_row
      },

      vb:column {
        spacing = CONTENT_SPACING,
  
       
        
        vb:space {height = DEFAULT_CONTROL_HEIGHT},
      
        
        vb:space {height = DEFAULT_CONTROL_HEIGHT},
       
        
     
      },

      vb:column {
        spacing = CONTENT_SPACING,

       
        
        
      }
    },
    
    -- close
    close_button_row
  }
  
  
  -- DIALOG
  
  control_example_dialog = renoise.app():show_custom_dialog(
    "Hei Maailma", dialog_content
  )

end

Ah, I see you took a snippet of code from ExampleToolGui, and then built on top of that.

If you look again at main.lua from ExampleToolGui, near the top it defines the following helper function:

local function show_status(message)
  renoise.app():show_status(message)
  print(message)
end

This is just a handy shortcut that is used throughout the tool itself, which your own derived code is obviously lacking.

So you can either simply add that helper function back to your own main.lua file, or you can change the references from the shortcuts show_status() back to the full line of code instead renoise.App():show_status()

Note that show_status() is a function of the renoise.app() class, so you must use a semicolon “:” to call the function itself, rather than a period “.” which you’d use when reading/writing basic properties.

renoise.app().show_status(renoise.app(), "I can see myself!")

just for lols :wink:

Can u help me a bit out more? how the code should look like if i want to only show image that chages when u click on it?

ok, I start my own investigations …

local function show_status(message)
renoise.app():show_status(message)
print(message)
end

This is just a handy shortcut that is used throughout the tool itself, which your own derived code is obviously lacking.

So you can either simply add that helper function back to your own main.lua file.

i really try to wrap myself around this, do you mean that “show_status” function: →

vb:bitmap {
-- recolor to match the GUI theme:
mode = "body_color",
-- bitmaps names should be specified with a relative path using
-- your tool script bundle path as base:
bitmap = "Bitmaps/RenoiseLua.bmp",
notifier = function()
show_status("bitmapview was pressed")
end
},

if u get wadai mean

I made it !!! Now my code gives note on the bottom bar when clicking image.

I can tell that my situation now is very horrible: i have broken laptop, am currently running on old tablecomputer with win 7 and some damn old ati radeon driver. If some horrible happens always some good also: i managed to install Ubuntu studio alongside Windose , no Blender3d working : ( , i have mouse but no real keyboard so i use onscreen keyb (meaning that i cant go into win7 because i cant press down on grub start menu, still can go into Ubuntu after timer because its on top prechoised), coding and gimp still works : ) , and Renoise is running like charm ; D

No Blender3d so i have decided to learn coding and do graphics inside Renoise :::}
Soon more …

I have at least twenty times tried to setup coding environment in Renoise during last five years or so. Imean like, to show scripting terminal --> find folders to edit config files – > download starters scripting pack --> change api to 5 --> change tool folder name.xrns, to same as scripts name --> and so on …

But this time (in my whacky new ubuntu installation in old computer) everything in setup phase went fast and easy : D and I also solved some problems in my upcoming graphical story-tool … … … … . . . .

.

like some subconscious learning have had happened while not coding for a while. I know that I have coders mind but it is rusty and not really been used in like 15 years …

Here is bit more polished code : \

renoise.tool():add_menu_entry {
  name = "Main Menu:Tools:StoryTool",
  invoke = function() available_controls() end 
}

function available_controls()

  local control_example_dialog = nil
  
  local vb = renoise.ViewBuilder()
  
  local DIALOG_MARGIN = 
    renoise.ViewBuilder.DEFAULT_DIALOG_MARGIN
  
  local CONTENT_SPACING = 
    renoise.ViewBuilder.DEFAULT_CONTROL_SPACING
  
  local CONTENT_MARGIN = 
    renoise.ViewBuilder.DEFAULT_CONTROL_MARGIN
  
  local DEFAULT_CONTROL_HEIGHT = 
    renoise.ViewBuilder.DEFAULT_CONTROL_HEIGHT
  
  local DEFAULT_DIALOG_BUTTON_HEIGHT =
    renoise.ViewBuilder.DEFAULT_DIALOG_BUTTON_HEIGHT
  
  local DEFAULT_MINI_CONTROL_HEIGHT = 
    renoise.ViewBuilder.DEFAULT_MINI_CONTROL_HEIGHT
  
  local TEXT_ROW_WIDTH = 80

  ---- CONTROL ROWS
 
  -- bitmapview 
  local bitmapview_row = vb:row {
    vb:text {
      width = TEXT_ROW_WIDTH,
      text = "Lua:bitmap"
    },
    vb:bitmap {
      -- recolor to match the GUI theme:
      mode = "transparent",
      -- bitmaps names should be specified with a relative path using
      -- your tool script bundle path as base:
      bitmap = "Bitmaps/RenoiseLua.bmp",
      notifier = function()
        renoise.app():show_status("Luabitmap was pressed")
      end
    },

  }

  
  -- close button
    
  local close_button_row = vb:horizontal_aligner {
    mode = "right",
    
    vb:button {
      text = "Close",
      width = 60,
      height = DEFAULT_DIALOG_BUTTON_HEIGHT,
      notifier = function()
        control_example_dialog:close()
      end,
    }
  }
    
    
  ---- MAIN CONTENT & LAYOUT
  
  local dialog_content = vb:column {
    margin = DIALOG_MARGIN,
    spacing = CONTENT_SPACING,
    
    vb:row{
      spacing = 4*CONTENT_SPACING,

      vb:column {
        spacing = CONTENT_SPACING,
        
        bitmapview_row
      },

      vb:column {
        spacing = CONTENT_SPACING,
  
        vb:space {height = DEFAULT_CONTROL_HEIGHT},
      
        vb:space {height = DEFAULT_CONTROL_HEIGHT},
     
      },

      vb:column {
        spacing = CONTENT_SPACING,
        
      }
    },
  }
  
  
  -- DIALOG
  
  control_example_dialog = renoise.app():show_custom_dialog(
    "Hei Maailma", dialog_content
  )

end

8295 Screenshot_2018-09-30_02-02-24.png

; D < StoryTool < home of my tooldevelopment !!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.