Module: TE3270::Accessors
- Defined in:
- lib/te3270/accessors.rb
Instance Method Summary collapse
-
#text_field(name, row, column, length, editable = true) ⇒ Object
adds two methods to the screen object - one to set text in a text field, another to retrieve text from a text field.
Instance Method Details
#text_field(name, row, column, length, editable = true) ⇒ Object
adds two methods to the screen object - one to set text in a text field, another to retrieve text from a text field.
19 20 21 22 23 24 25 26 27 |
# File 'lib/te3270/accessors.rb', line 19 def text_field(name, row, column, length, editable=true) define_method(name) do platform.get_string(row, column, length) end define_method("#{name}=") do |value| platform.put_string(value, row, column) end if editable end |