Fix STRING_32 issues
This commit is contained in:
@@ -73,7 +73,7 @@ feature -- Implementation
|
||||
event: detachable STRING_32
|
||||
event_parameter: detachable ANY
|
||||
event_control_name: detachable STRING_32
|
||||
states: STRING_32
|
||||
states: STRING_8
|
||||
states_changes: WSF_JSON_OBJECT
|
||||
json_parser: JSON_PARSER
|
||||
do
|
||||
|
||||
@@ -25,7 +25,7 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Implementation
|
||||
|
||||
autocompletion (input: STRING): JSON_ARRAY
|
||||
autocompletion (input: STRING_32): JSON_ARRAY
|
||||
-- Implementation
|
||||
local
|
||||
o: JSON_OBJECT
|
||||
|
||||
@@ -24,7 +24,7 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Implementation
|
||||
|
||||
autocompletion (input: STRING): JSON_ARRAY
|
||||
autocompletion (input: STRING_32): JSON_ARRAY
|
||||
-- Implementation
|
||||
local
|
||||
list: ITERABLE [TUPLE [STRING, STRING]]
|
||||
|
||||
@@ -24,7 +24,7 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Implementation
|
||||
|
||||
autocompletion (input: STRING): JSON_ARRAY
|
||||
autocompletion (input: STRING_32): JSON_ARRAY
|
||||
-- Implementation
|
||||
local
|
||||
cl: LIBCURL_HTTP_CLIENT
|
||||
@@ -32,7 +32,7 @@ feature -- Implementation
|
||||
l_json: detachable READABLE_STRING_8
|
||||
o: JSON_OBJECT
|
||||
json_parser: JSON_PARSER
|
||||
query_str: STRING
|
||||
query_str: STRING_32
|
||||
do
|
||||
query_str := input
|
||||
query_str.replace_substring_all (" ", "+")
|
||||
@@ -50,7 +50,7 @@ feature -- Implementation
|
||||
loop
|
||||
if attached {JSON_STRING} list.i_th (c.item) as row then
|
||||
create o.make
|
||||
o.put (create {JSON_STRING}.make_json (row.unescaped_string_32), "value")
|
||||
o.put (create {JSON_STRING}.make_json (row.unescaped_STRING_32), "value")
|
||||
Result.add (o)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -47,7 +47,7 @@ feature
|
||||
|
||||
show_code
|
||||
do
|
||||
start_modal ("/codeview?file=" + generator.as_lower, "Eiffel code " + generator, true)
|
||||
start_modal ({STRING_32}"/codeview?file=" + generator.as_string_32.as_lower, "Eiffel code " + generator, true)
|
||||
end
|
||||
|
||||
feature
|
||||
|
||||
@@ -27,7 +27,7 @@ feature
|
||||
-- Function called on page load (not on callback)
|
||||
local
|
||||
l_file: PLAIN_TEXT_FILE
|
||||
l_content: STRING
|
||||
l_content: STRING_32
|
||||
do
|
||||
if attached get_parameter ("file") as f then
|
||||
create l_file.make_open_read ("./"+f+".e")
|
||||
|
||||
@@ -19,10 +19,10 @@ feature {NONE}
|
||||
make_from_json (json: JSON_OBJECT)
|
||||
do
|
||||
if attached {JSON_STRING} json.item ("title") as l_title then
|
||||
title := l_title.unescaped_string_32
|
||||
title := l_title.unescaped_STRING_32
|
||||
end
|
||||
if attached {JSON_STRING} json.item ("content") as l_content then
|
||||
content := l_content.unescaped_string_32
|
||||
content := l_content.unescaped_STRING_32
|
||||
end
|
||||
if
|
||||
attached {JSON_OBJECT} json.item ("image") as img and then
|
||||
@@ -34,11 +34,11 @@ feature {NONE}
|
||||
|
||||
feature -- Access
|
||||
|
||||
title: detachable STRING
|
||||
title: detachable STRING_32
|
||||
|
||||
content: detachable STRING
|
||||
content: detachable STRING_32
|
||||
|
||||
image: detachable STRING
|
||||
image: detachable STRING_32
|
||||
|
||||
item alias "[]" (a_field: READABLE_STRING_GENERAL): detachable ANY
|
||||
-- <Precursor>
|
||||
|
||||
@@ -49,7 +49,7 @@ feature
|
||||
list: LINKED_LIST [GOOGLE_NEWS]
|
||||
l_json: detachable READABLE_STRING_8
|
||||
json_parser: JSON_PARSER
|
||||
query_str: STRING
|
||||
query_str: STRING_32
|
||||
cl: LIBCURL_HTTP_CLIENT
|
||||
sess: HTTP_CLIENT_SESSION
|
||||
do
|
||||
@@ -89,11 +89,11 @@ feature
|
||||
|
||||
feature
|
||||
|
||||
set_query (q: STRING)
|
||||
set_query (q: STRING_32)
|
||||
do
|
||||
query := q
|
||||
end
|
||||
|
||||
query: STRING
|
||||
query: STRING_32
|
||||
|
||||
end
|
||||
|
||||
@@ -16,9 +16,9 @@ create
|
||||
|
||||
feature
|
||||
|
||||
render_item (item: GOOGLE_NEWS): STRING
|
||||
render_item (item: GOOGLE_NEWS): STRING_32
|
||||
local
|
||||
body: STRING
|
||||
body: STRING_32
|
||||
do
|
||||
Result := ""
|
||||
if attached item.image as image then
|
||||
|
||||
@@ -9,7 +9,7 @@ class
|
||||
|
||||
inherit
|
||||
|
||||
WSF_VALIDATOR [STRING]
|
||||
WSF_VALIDATOR [STRING_32]
|
||||
|
||||
create
|
||||
make_own
|
||||
@@ -23,7 +23,7 @@ feature {NONE}
|
||||
|
||||
feature
|
||||
|
||||
is_valid (input: STRING): BOOLEAN
|
||||
is_valid (input: STRING_32): BOOLEAN
|
||||
do
|
||||
Result := input.count < 5
|
||||
end
|
||||
|
||||
@@ -21,30 +21,30 @@ feature
|
||||
|
||||
initialize_controls
|
||||
local
|
||||
n1_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||
n2_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||
n3_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||
n4_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||
n5_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||
cats_container: WSF_FORM_ELEMENT_CONTROL [LIST [STRING]]
|
||||
n1_container: WSF_FORM_ELEMENT_CONTROL [STRING_32]
|
||||
n2_container: WSF_FORM_ELEMENT_CONTROL [STRING_32]
|
||||
n3_container: WSF_FORM_ELEMENT_CONTROL [STRING_32]
|
||||
n4_container: WSF_FORM_ELEMENT_CONTROL [STRING_32]
|
||||
n5_container: WSF_FORM_ELEMENT_CONTROL [STRING_32]
|
||||
cats_container: WSF_FORM_ELEMENT_CONTROL [LIST [STRING_32]]
|
||||
source: INCREASING_PROGRESSSOURCE
|
||||
do
|
||||
Precursor
|
||||
create form.make
|
||||
--Number 1
|
||||
create textbox1.make ("1")
|
||||
create n1_container.make ("Number1", textbox1)
|
||||
n1_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make ("Invalid Number"))
|
||||
create textbox1.make ({STRING_32}"1")
|
||||
create n1_container.make ({STRING_32}"Number1", textbox1)
|
||||
n1_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make ({STRING_32}"Invalid Number"))
|
||||
n1_container.add_validator (create {OWN_VALIDATOR}.make_own)
|
||||
form.add_control (n1_container)
|
||||
--Number 2
|
||||
create textbox2.make ("2")
|
||||
create n2_container.make ("Number2", textbox2)
|
||||
n2_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make ("Invalid Number"))
|
||||
create textbox2.make ({STRING_32}"2")
|
||||
create n2_container.make ({STRING_32}"Number2", textbox2)
|
||||
n2_container.add_validator (create {WSF_DECIMAL_VALIDATOR}.make ({STRING_32}"Invalid Number"))
|
||||
form.add_control (n2_container)
|
||||
--Flag autocomplete
|
||||
create autocompletion1.make (create {FLAG_AUTOCOMPLETION}.make)
|
||||
create n3_container.make ("Flag Autocomplete", autocompletion1)
|
||||
create n3_container.make ({STRING_32}"Flag Autocomplete", autocompletion1)
|
||||
form.add_control (n3_container)
|
||||
--Contact autocomplete
|
||||
create autocompletion2.make (create {CONTACT_AUTOCOMPLETION}.make)
|
||||
@@ -60,8 +60,8 @@ feature
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("Operating Systems", "os"))
|
||||
cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make ("Formal Methods and Functional Programming", "fmfp"))
|
||||
create cats_container.make ("Categories", cklist)
|
||||
cats_container.add_validator (create {WSF_MIN_VALIDATOR [LIST [STRING]]}.make (1, "Choose at least one category"))
|
||||
cats_container.add_validator (create {WSF_MAX_VALIDATOR [LIST [STRING]]}.make (2, "Choose at most two category"))
|
||||
cats_container.add_validator (create {WSF_MIN_VALIDATOR [LIST [STRING_32]]}.make (1, "Choose at least one category"))
|
||||
cats_container.add_validator (create {WSF_MAX_VALIDATOR [LIST [STRING_32]]}.make (2, "Choose at most two category"))
|
||||
form.add_control (cats_container)
|
||||
--Button 1
|
||||
create button1.make ("Update")
|
||||
@@ -74,7 +74,7 @@ feature
|
||||
form.add_control (button2)
|
||||
--Result
|
||||
create result_html.make ("p", "")
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make ("Result", result_html))
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING_32]}.make ("Result", result_html))
|
||||
control.add_control (form)
|
||||
|
||||
--Progress bar
|
||||
@@ -102,7 +102,7 @@ feature
|
||||
text.append ("<li>" + s.item + "</li>")
|
||||
end
|
||||
text.append ("</ul>")
|
||||
result_html.set_html (text)
|
||||
result_html.set_value (text)
|
||||
else
|
||||
show_alert ("VALIDATION ERROR")
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ feature -- Implementation
|
||||
end
|
||||
end
|
||||
|
||||
upload_file (f: ITERABLE [WSF_UPLOADED_FILE]): detachable String
|
||||
upload_file (f: ITERABLE [WSF_UPLOADED_FILE]): detachable STRING_32
|
||||
do
|
||||
-- Store file on server and return link
|
||||
across
|
||||
@@ -110,10 +110,10 @@ feature -- Properties
|
||||
|
||||
filebox3: WSF_FILE_CONTROL
|
||||
|
||||
n1_container: WSF_FORM_ELEMENT_CONTROL [detachable WSF_FILE]
|
||||
n1_container: WSF_FORM_ELEMENT_CONTROL [detachable WSF_FILE_DEFINITION]
|
||||
|
||||
n2_container: WSF_FORM_ELEMENT_CONTROL [detachable WSF_FILE]
|
||||
n2_container: WSF_FORM_ELEMENT_CONTROL [detachable WSF_FILE_DEFINITION]
|
||||
|
||||
n3_container: WSF_FORM_ELEMENT_CONTROL [detachable WSF_FILE]
|
||||
n3_container: WSF_FORM_ELEMENT_CONTROL [detachable WSF_FILE_DEFINITION]
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user