Remove ugly do nothing hack

This commit is contained in:
YNH Webdev
2013-08-28 15:30:13 +02:00
parent b7ab840d71
commit 4e09a15454
2 changed files with 6 additions and 15 deletions

View File

@@ -20,7 +20,6 @@ feature {NONE}
do do
control_name := n control_name := n
text := v text := v
click_event := agent donothing
end end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
@@ -40,10 +39,6 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
feature --EVENT HANDLING feature --EVENT HANDLING
donothing (p: WSF_PAGE_CONTROL) --UGLY HACK MUST BE REMOVED
do
end
set_click_event (e: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]) set_click_event (e: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]])
do do
click_event := e click_event := e
@@ -51,8 +46,8 @@ feature --EVENT HANDLING
handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL) handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL)
do do
if Current.control_name.is_equal (cname) and attached click_event then if Current.control_name.is_equal (cname) and attached click_event as cevent then
click_event.call ([page]) cevent.call ([page])
end end
end end
@@ -72,6 +67,6 @@ feature
text: STRING text: STRING
click_event: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]] click_event: detachable PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
end end

View File

@@ -20,7 +20,6 @@ feature {NONE}
do do
control_name := n control_name := n
text := v text := v
change_event := agent donothing
end end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
@@ -40,9 +39,6 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
feature --EVENT HANDLING feature --EVENT HANDLING
donothing (p: WSF_PAGE_CONTROL) --UGLY HACK MUST BE REMOVED
do
end
set_change_event (e: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]) set_change_event (e: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]])
do do
@@ -51,9 +47,9 @@ feature --EVENT HANDLING
handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL) handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL)
do do
if Current.control_name.is_equal (cname) and attached change_event then if Current.control_name.is_equal (cname) and attached change_event as cevent then
if event.is_equal ("change") then if event.is_equal ("change") then
change_event.call ([page]) cevent.call ([page])
end end
end end
end end
@@ -74,6 +70,6 @@ feature
text: STRING text: STRING
change_event: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]] change_event: detachable PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
end end