Fixed a few void-safety issue, attribute not initialized before computing agent objects.
This commit is contained in:
@@ -20,15 +20,16 @@ feature
|
||||
|
||||
initialize_controls
|
||||
do
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", "Grid Demo"))
|
||||
create datasource.make_news
|
||||
create search_query.make (create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
search_query.add_class ("form-control")
|
||||
create grid.make (<<create {WSF_GRID_COLUMN}.make ("Title", "title"), create {WSF_GRID_COLUMN}.make ("Content", "content")>>, datasource)
|
||||
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", "Grid Demo"))
|
||||
search_query.set_change_event (agent change_query)
|
||||
control.add_control (search_query)
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h2", "", "Results"))
|
||||
create grid.make (<<create {WSF_GRID_COLUMN}.make ("Title", "title"), create {WSF_GRID_COLUMN}.make ("Content", "content")>>, datasource)
|
||||
control.add_control (grid)
|
||||
navbar.set_active (2)
|
||||
end
|
||||
|
||||
@@ -20,15 +20,17 @@ feature
|
||||
|
||||
initialize_controls
|
||||
do
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", " Repeater Demo"))
|
||||
create datasource.make_news
|
||||
create repeater.make (datasource)
|
||||
create search_query.make (create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
search_query.add_class ("form-control")
|
||||
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", " Repeater Demo"))
|
||||
search_query.set_change_event (agent change_query)
|
||||
control.add_control (search_query)
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h2", "", "Results"))
|
||||
create repeater.make (datasource)
|
||||
|
||||
control.add_control (repeater)
|
||||
navbar.set_active (3)
|
||||
end
|
||||
|
||||
@@ -28,7 +28,6 @@ feature
|
||||
cats_container: WSF_FORM_ELEMENT_CONTROL [LIST [STRING_32]]
|
||||
source: INCREASING_PROGRESSSOURCE
|
||||
do
|
||||
Precursor
|
||||
create form.make
|
||||
--Number 1
|
||||
create textbox1.make ({STRING_32} "1")
|
||||
@@ -64,24 +63,33 @@ feature
|
||||
form.add_control (cats_container)
|
||||
--Button 1
|
||||
create button1.make ("Update")
|
||||
button1.set_click_event (agent handle_click)
|
||||
button1.add_class ("col-lg-offset-2")
|
||||
form.add_control (button1)
|
||||
--Button 2
|
||||
create button2.make ("Start Modal Grid")
|
||||
button2.set_click_event (agent run_modal)
|
||||
form.add_control (button2)
|
||||
--Result
|
||||
create result_html.make ("p", "")
|
||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING_32]}.make ("Result", result_html))
|
||||
control.add_control (form)
|
||||
|
||||
--Progress bar
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h4", "", "Autoincrementing progressbar"))
|
||||
create source.make
|
||||
create progress.make_with_source (source)
|
||||
source.set_control (progress)
|
||||
progress.set_isolation (true)
|
||||
|
||||
|
||||
Precursor
|
||||
|
||||
control.add_control (form)
|
||||
|
||||
-- Actions
|
||||
button1.set_click_event (agent handle_click)
|
||||
button2.set_click_event (agent run_modal)
|
||||
|
||||
|
||||
--Progress bar
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h4", "", "Autoincrementing progressbar"))
|
||||
control.add_control (progress)
|
||||
navbar.set_active (1)
|
||||
end
|
||||
|
||||
@@ -20,7 +20,6 @@ feature -- Implementation
|
||||
|
||||
initialize_controls
|
||||
do
|
||||
Precursor
|
||||
create slider.make
|
||||
--slider.add_control (form, Void)
|
||||
--slider.add_image ("http://www.placesmustseen.com/wp-content/uploads/2013/01/paris-eiffel-tower.jpg", "Eiffel Tower")
|
||||
@@ -28,6 +27,8 @@ feature -- Implementation
|
||||
slider.add_image ("http://31.media.tumblr.com/5b5ae35c4f88d4b80aeb21e36263c6e6/tumblr_mtw7mhZsCe1st5lhmo1_1280.jpg", "landscape")
|
||||
slider.add_image ("http://25.media.tumblr.com/403969159fb1642e67ed702f28e966e0/tumblr_muuig0890N1st5lhmo1_1280.jpg", "landscape")
|
||||
slider.add_image ("http://24.media.tumblr.com/d349779e7216167e7c0ca3af66817794/tumblr_mufrlh9WqW1st5lhmo1_1280.jpg", "landscape")
|
||||
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", " Image Slider Demo"))
|
||||
control.add_control (slider)
|
||||
navbar.set_active (4)
|
||||
|
||||
@@ -21,20 +21,25 @@ feature -- Implementation
|
||||
initialize_controls
|
||||
local
|
||||
do
|
||||
create form.make
|
||||
create filebox.make
|
||||
create n1_container.make ("File Upload", filebox)
|
||||
create filebox2.make
|
||||
create n2_container.make ("Auto start Upload", filebox2)
|
||||
create filebox3.make_with_image_preview
|
||||
create n3_container.make ("Image Upload", filebox3)
|
||||
create button1.make ("Update")
|
||||
|
||||
Precursor
|
||||
control.add_control (create {WSF_BASIC_CONTROL}.make_with_body ("h1", "", "File Upload Demo"))
|
||||
create form.make
|
||||
|
||||
--File
|
||||
create filebox.make
|
||||
filebox.set_upload_function (agent upload_file)
|
||||
filebox.set_upload_done_event (agent submit_form)
|
||||
create n1_container.make ("File Upload", filebox)
|
||||
n1_container.add_validator (create {WSF_FILESIZE_VALIDATOR}.make (10000000, "File must be smaller than 10MB"))
|
||||
form.add_control (n1_container)
|
||||
--File
|
||||
create filebox2.make
|
||||
filebox2.set_upload_function (agent upload_file)
|
||||
create n2_container.make ("Auto start Upload", filebox2)
|
||||
filebox2.set_change_event (agent
|
||||
do
|
||||
n1_container.validate
|
||||
@@ -45,15 +50,13 @@ feature -- Implementation
|
||||
n2_container.add_validator (create {WSF_FILESIZE_VALIDATOR}.make (10000000, "File must be smaller than 10MB"))
|
||||
form.add_control (n2_container)
|
||||
--Image
|
||||
create filebox3.make_with_image_preview
|
||||
|
||||
filebox3.set_upload_function (agent upload_file)
|
||||
filebox3.set_upload_done_event (agent submit_form)
|
||||
create n3_container.make ("Image Upload", filebox3)
|
||||
n3_container.add_validator (create {WSF_FILESIZE_VALIDATOR}.make (10000000, "File must be smaller than 10MB"))
|
||||
form.add_control (n3_container)
|
||||
|
||||
--Button 1
|
||||
create button1.make ("Update")
|
||||
button1.set_click_event (agent submit_form)
|
||||
button1.add_class ("col-lg-offset-2")
|
||||
form.add_control (button1)
|
||||
|
||||
Reference in New Issue
Block a user