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

@@ -39,6 +39,9 @@ feature -- Add control
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)