def initialize( name, associations, root )
super()
@name = name
@associations = associations
@root = root
@values = {}
@once = {}
@application = @root.application
self.class.keys_to_delete_from_associations.each do |key|
@associations.delete(key)
end
if bindings = value(:delegate) then
if Class === bindings then
klass = bindings
options = {}
else
klass = bindings[:class]
end
if Delegate > klass then
unless klass.support?(self.class) then
raise "#{klass} doesn't support #{self.class}."
end
else
raise "Delegate class #{klass} must inherit CGIKit::Delegate."
end
@delegate = klass.new
@delegate.bindings = bindings
@delegate.element = self
@delegate.component = root
end
init
end