Class: MyRendererEditableList
- Inherits:
-
Mylist::MyListHolder
- Object
- Gtk::Frame
- Mylist::MyListHolder
- MyRendererEditableList
- Includes:
- ManqodCommon
- Defined in:
- lib/FormHolder/Form/InputHolder/EditableList.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
Instance Attribute Summary collapse
-
#pc ⇒ Object
signal_connect(‘activate’){|me| edebug(inspect+“ ‘#{item}’ changed to item #meme.activeme.active.inspect”,“form”,“debug”) pc.changed pc.notify_observers(self) edebug(“‘#'data'’ emiting ‘changed’ to observers”,“form”,“debug”) run_events(item,‘form_item-Action’) }.
Attributes inherited from Mylist::MyListHolder
#buttonholder, #caller, #child_placement, #gantt, #info, #list, #list_id, #list_panel, #list_scroller, #notebook, #parentM, #placeholder_button, #widget
Instance Method Summary collapse
-
#initialize(pc) ⇒ MyRendererEditableList
constructor
A new instance of MyRendererEditableList.
- #inspect ⇒ Object
- #item ⇒ Object
- #method_missing(sym, *args) ⇒ Object
- #parentselected ⇒ Object
- #text ⇒ Object
- #to_s ⇒ Object
- #update(new_value = item['default']) ⇒ Object
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
Methods inherited from Mylist::MyListHolder
#advanced_filter, #archive_button, #child1, #child2, #embedd?, #history_window, #pack1, #pack2, #pack_child, #position, #progress, #repack_self, #repack_widget, #set_id, #set_parentM, #set_position, #set_position_set, #sum_button, #title
Methods included from Conf
#get_conf, #load_conf, #save_conf, #set_conf
Constructor Details
#initialize(pc) ⇒ MyRendererEditableList
Returns a new instance of MyRendererEditableList.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 7 def initialize(pc) @pc=pc super(pc.parentM.parentM) set_parentM(pc.parentM.parentM) list.set_id(pc.target) unless @pc.parentM.wysiwygf? @pc.set_include_in_query_building(false) # set_has_frame(false) =begin 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 end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args) ⇒ Object
49 50 51 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 49 def method_missing(sym,*args) text end |
Instance Attribute Details
#pc ⇒ Object
signal_connect(‘activate’){|me| edebug(inspect+“ ‘#{item}’ changed to item #MyRendererEditableList.meme.activeme.active.inspect”,“form”,“debug”) pc.changed pc.notify_observers(self) edebug(“‘#'data'’ emiting ‘changed’ to observers”,“form”,“debug”) run_events(item,‘form_item-Action’) }
25 26 27 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 25 def pc @pc end |
Instance Method Details
#inspect ⇒ Object
52 53 54 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 52 def inspect "Text(#{item["description"]})" end |
#item ⇒ Object
31 32 33 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 31 def item @pc.item end |
#parentselected ⇒ Object
45 46 47 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 45 def parentselected @pc.parentselected end |
#text ⇒ Object
27 28 29 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 27 def text list.get_cursor_id.to_s end |
#to_s ⇒ Object
55 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 55 def to_s;inspect;end |
#update(new_value = item['default']) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/FormHolder/Form/InputHolder/EditableList.rb', line 35 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'] pc.set_editable(pc.parentM.runmode != "add") super(pc.parentM.parentM) unless @pc.parentM.wysiwygf? run_events(item['id'],'form_item-AfterUpdate') end |