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
control_name := n
text := v
click_event := agent donothing
end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
@@ -40,10 +39,6 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
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]])
do
click_event := e
@@ -51,8 +46,8 @@ feature --EVENT HANDLING
handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL)
do
if Current.control_name.is_equal (cname) and attached click_event then
click_event.call ([page])
if Current.control_name.is_equal (cname) and attached click_event as cevent then
cevent.call ([page])
end
end
@@ -72,6 +67,6 @@ feature
text: STRING
click_event: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
click_event: detachable PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
end

View File

@@ -20,7 +20,6 @@ feature {NONE}
do
control_name := n
text := v
change_event := agent donothing
end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
@@ -40,9 +39,6 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
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]])
do
@@ -51,9 +47,9 @@ feature --EVENT HANDLING
handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL)
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
change_event.call ([page])
cevent.call ([page])
end
end
end
@@ -74,6 +70,6 @@ feature
text: STRING
change_event: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
change_event: detachable PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
end