Docs: Attach behavior

In Component Behaviour @ it says:

// $name uniquely identifies the behavior in the component


// test() is a method of $behavior


but $behavior->attach($name, $component) is public void attach(CComponent $owner)

Even so, I can’t make that work, but then $component->attachBehavior(‘some_name’, new SomeClass) makes a lot more sense to me and it works :wink:

Thanks. Fixed in svn. It should be $component->attachBehavior($name,$behavior);