commit bf61048e8b26fa6ab1f856e41e42098c7b494d74
parent bc9241413680383884de01b686d23d3d300f9f4a
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date: Mon, 1 Mar 2010 15:27:15 -0800
Merge branch 'master' into next
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb
@@ -34,8 +34,10 @@ class TextField
@question = question
@completion_block = block
@field = Ncurses::Form.new_field 1, @width - question.length, @y, @x + question.length, 0, 0
- @field.opts_off Ncurses::Form::O_STATIC
- @field.opts_off Ncurses::Form::O_BLANK
+ if @field.respond_to? :opts_off
+ @field.opts_off Ncurses::Form::O_STATIC
+ @field.opts_off Ncurses::Form::O_BLANK
+ end
@form = Ncurses::Form.new_form [@field]
@value = default || ''
Ncurses::Form.post_form @form