Class: MyCellRendererComboText

Inherits:
Gtk::CellRendererText
  • Object
show all
Defined in:
lib/ListHolder/EditableList/CellRenderers/ComboText.rb

Overview

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])

Instance Method Summary collapse

Constructor Details

#initialize(column) ⇒ MyCellRendererComboText

Returns a new instance of MyCellRendererComboText.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/ListHolder/EditableList/CellRenderers/ComboText.rb', line 6

def initialize(column)
	@myvalues=Hash.new
	super
	if q=query(querySQL) then
		while row=q.fetch_hash()
			@myvalues[row['cdata']]=row['cdisplay']
		end
	end
	set_editable(false)
	set_editable_set(false)
end

Instance Method Details

#get_display(key) ⇒ Object



18
19
20
# File 'lib/ListHolder/EditableList/CellRenderers/ComboText.rb', line 18

def get_display(key)
	@myvalues[key]
end