Added precondition in layout control

This commit is contained in:
severin
2014-01-04 14:15:05 +01:00
parent c9599f449f
commit c4acbf563f

View File

@@ -38,14 +38,17 @@ feature -- Add control
add_control_raw (div) add_control_raw (div)
end end
add_control (col:INTEGER; c: WSF_STATELESS_CONTROL) add_control (col: INTEGER; c: WSF_STATELESS_CONTROL)
require
col >= 1 and col <= controls.count
attached {WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL]} controls [col]
do do
if attached {WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL]}controls[col] as div then if attached {WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL]} controls [col] as div then
div.add_control (c) div.add_control (c)
end end
end end
add_column (span:INTEGER) add_column (span: INTEGER)
local local
div: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL] div: WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL]
do do