Class: MyRendererText

Inherits:
Gtk::Entry
  • Object
show all
Includes:
ManqodCommon
Defined in:
lib/FormHolder/Form/InputHolder/Text.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])

Constant Summary

Constants included from ManqodCommon

ManqodCommon::CRITICAL, ManqodCommon::DEBUG, ManqodCommon::ERROR, ManqodCommon::INFO, ManqodCommon::NORMAL, ManqodCommon::WARNING

Constants included from Eprint

Eprint::DOMAIN, Eprint::LEVEL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ManqodCommon

#add_where, #admin, #admin_cache, #admin_qrow, #admin_rows, #backtrace_to_debug, #cache, #changed_ids_of_base, #client, #client_fields, #client_image_of_id, #client_qrow, #client_query, #client_rows, #eeval, #escape_string, #getBinding, #guess_base, #guess_table, #image_of_id, #lzero, #manqod_db, #measure, #myexec, #nick, #nick_id, #number_format, #qrow, #query, #reconnect_manqod_db, #rows, #run_events, #send_message, #sendmail, #set_manqod_db_uri, #set_nick

Methods included from Eprint

#ecode, #edebug, #eerror, #einfo, #enormal, #eprint, #ewarn, #gtk_set_edebug, #set_edebug, #tell_exception

Constructor Details

#initialize(pc) ⇒ MyRendererText

Returns a new instance of MyRendererText.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 7

def initialize(pc)
  @pc=pc
  super()
  set_has_frame(false)
		signal_connect('activate'){|me| 
		edebug(inspect+" '#{item['data']}' changed to item #{me.active.inspect}","form","debug")
		pc.changed
		pc.notify_observers(self)
		edebug("'#{item['data']}' emiting 'changed' to observers","form","debug")
		run_events(item['id'],'form_item-Action')
	}

end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object



47
48
49
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 47

def method_missing(sym,*args)
	text
end

Instance Attribute Details

#pcObject

Returns the value of attribute pc.



20
21
22
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 20

def pc
  @pc
end

Instance Method Details

#inspectObject



50
51
52
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 50

def inspect
	"Text(#{item["description"]})"
end

#itemObject



26
27
28
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 26

def item
	@pc.item
end

#parentMObject



43
44
45
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 43

def parentM
  @pc.parentM
end

#parentselectedObject



39
40
41
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 39

def parentselected
  @pc.parentselected
end

#textObject



22
23
24
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 22

def text
  super
end

#to_sObject



53
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 53

def to_s;inspect;end

#update(new_value = item['default']) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/FormHolder/Form/InputHolder/Text.rb', line 30

def update(new_value=item['default'])
  item['default']=new_value
  run_events(item['id'],'form_item-BeforeUpdate')
	pc.run_query
  set_text(item['default'].to_s) if item['default']
#	  set_sensitive(item['editable']=="true")
  run_events(item['id'],'form_item-AfterUpdate')
end