Added precondition in layout control
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user