Yii Framework Forum: why CBehavior::setEnabled() deos not work - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

why CBehavior::setEnabled() deos not work why CBehavior::setEnabled() deos not work Rate Topic: -----

#1 User is offline   Roy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-March 10

Posted 27 July 2010 - 04:23 AM

why CBehavior::setEnabled() deos not work
Man's grasp exceeds his imagination
0

#2 User is offline   andy_s 

  • Random Member Title
  • Yii
  • Group: Moderators
  • Posts: 1,526
  • Joined: 22-June 09
  • Location:Russia, Kostroma

Posted 27 July 2010 - 05:09 AM

Provide us more info please? :)
0

#3 User is offline   Roy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 30-March 10

Posted 28 July 2010 - 04:59 AM

               // MyComponent is a child class of Component
                // Grow and Play extends CBehavior
                $grow = new MyComponent;
                $gBehavior = new Grow;
                $pBehavior = new Play;
                $grow->attachBehavior('grow',$gBehavior);
                $grow->attachBehavior('play',$pBehavior);
                $grow->disableBehavior('play'); //why does this step not work
                $grow->run();

Man's grasp exceeds his imagination
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users