samples/99_genre_dev_tools/add_buttons_to_console/app/main.rb
def custom_button_also_clicked
    log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!"

    all_buttons_as_string = $gtk.console.menu.buttons.map do |b|
      <<-S.strip
** id: #{b[:id]}
:PROPERTIES:
:id:     :#{b[:id]}
:method: :#{b[:method]}
:text:   #{b[:text]}
:END:
S
    end.join("\n")

    log <<-S
* INFO: Here are all the buttons:
#{all_buttons_as_string}
S
  end
# STEP 1: Override the custom_buttons function.
STEP 1: Override the custom_buttons function.
STEP 1 : Override the custom_buttons function .
def custom_button_also_clicked
    log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!"
    all_buttons_as_string = $gtk.console.menu.buttons.map do |b|
      <<-S.strip
** id: #{b[:id]}
:PROPERTIES:
:id:     :#{b[:id]}
:method: :#{b[:method]}
:text:   #{b[:text]}
:END:
S
    end.join("\n")
    log <<-S
* INFO: Here are all the buttons:
#{all_buttons_as_string}
S
  end
def custom_button_also_clicked log "* INFO: Custom Button Clicked at #{Kernel.global_tick_count}!" all_buttons_as_string = $gtk . console . menu . buttons . map do | b | <<-S . strip 
** id:  #{ b [ :id ] } 
:PROPERTIES:
:id:     : #{ b [ :id ] } 
:method: : #{ b [ :method ] } 
:text:    #{ b [ :text ] } 
:END:
 S end . join ( "\n" ) log <<-S 
* INFO: Here are all the buttons:
 #{ all_buttons_as_string } S end
STEP 1: Override the custom_buttons function.
STEP 1 : Override the custom_buttons function .