Pretty Print

This commit is contained in:
YNH Webdev
2013-08-27 16:00:24 +02:00
parent 74995101d1
commit 850a05d6bb
3 changed files with 90 additions and 81 deletions

View File

@@ -8,10 +8,14 @@ class
WSF_BUTTON_CONTROL WSF_BUTTON_CONTROL
inherit inherit
WSF_CONTROL WSF_CONTROL
create create
make make
feature {NONE} feature {NONE}
make (n: STRING; v: STRING) make (n: STRING; v: STRING)
do do
make_control make_control
@@ -19,13 +23,15 @@ feature {NONE}
text := v text := v
click_event := agent donothing click_event := agent donothing
end end
feature feature
--UGLY HACK MUST BE REMOVED --UGLY HACK MUST BE REMOVED
donothing (p: WSF_PAGE_CONTROL) donothing (p: WSF_PAGE_CONTROL)
do do
end end
handle_callback (event: STRING; cname: STRING; page: WSF_PAGE_CONTROL) handle_callback (event: STRING; cname: STRING; page: WSF_PAGE_CONTROL)
do do
if Current.control_name = cname and attached click_event then if Current.control_name = cname and attached click_event then
@@ -44,8 +50,10 @@ feature
Result.put (create {JSON_STRING}.make_json (text), create {JSON_STRING}.make_json ("text")) Result.put (create {JSON_STRING}.make_json (text), create {JSON_STRING}.make_json ("text"))
end end
feature feature
text: STRING text: STRING
click_event: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]] click_event: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]]
end end

View File

@@ -6,13 +6,16 @@ note
deferred class deferred class
WSF_CONTROL WSF_CONTROL
feature {NONE} feature {NONE}
make_control make_control
do do
control_name := "" control_name := ""
end end
feature feature
control_name: STRING control_name: STRING
feature {WSF_PAGE_CONTROL} feature {WSF_PAGE_CONTROL}

View File

@@ -33,7 +33,6 @@ feature
feature feature
execute execute
local local
event: detachable STRING event: detachable STRING
@@ -73,7 +72,6 @@ feature
if attached value then if attached value then
Result := value.as_string.value Result := value.as_string.value
end end
end end
feature {NONE} feature {NONE}