examples/testcombo.rb in canis-0.0.8 vs examples/testcombo.rb in canis-0.0.10
- old
+ new
@@ -2,11 +2,11 @@
require 'canis'
require 'canis/core/widgets/rcombo'
require 'canis/core/include/appmethods.rb'
def help_text
<<-eos
-# COMBO HELP
+# COMBO HELP
This is some help text for |Combos|
You may press <SPACE> to invoke the popup and then use arrow keys to traverse. (j and k may also work)
'v' on the popup to select (or whatever has been set as $row_selector (#{keycode_tos($row_selector)}) )
@@ -28,17 +28,17 @@
begin
# Initialize curses
Canis::start_ncurses # this is initializing colors via ColorMap.setup
path = File.join(ENV["LOGDIR"] || "./" ,"canis14.log")
- file = File.open(path, File::WRONLY|File::TRUNC|File::CREAT)
+ file = File.open(path, File::WRONLY|File::TRUNC|File::CREAT)
$log = Logger.new(path)
$log.level = Logger::DEBUG
@window = Canis::Window.root_window
- # Initialize few color pairs
- # Create the window to be associated with the form
+ # Initialize few color pairs
+ # Create the window to be associated with the form
# Un post form and free the memory
catch(:close) do
colors = Ncurses.COLORS
$log.debug "START #{colors} colors testcombo.rb --------- #{@window} "
@@ -47,10 +47,10 @@
Label.new @form, {:text => title, :row => 1, :col => 0, :color => :green, :bgcolor => :black}
r = 3; fc = 12;
- cb = ComboBox.new @form, :row => 7, :col => 2, :width => 20,
+ cb = ComboBox.new @form, :row => 7, :col => 2, :width => 20,
:list => %w[xterm xterm-color xterm-256color screen vt100 vt102],
:arrow_key_policy => :popup,
:label => "Declare terminal as: "
# arrow_key_policy can be popup or ignore