Hi again,
I’m trying to write my own widget and I ran into someting strange … well. I found here http://www.yiiframew…xtension.create that, in order to publish CSS and JS (if needed), the CClientScript is my friend. Ok then, let’s call …
$cs=Yii::app()->getClientScript();
… like I’m suppose to. But then I an error is raised (call to undefined method CWebApplication::getClientScript()).
I looked into base classes, and it seems that none of the base classes (CWebApplication, CApplication, CComponent) contains the clientScript property. I found it in CController and writting …
$cs=Yii::app()->getController()->getClientScript();
…I could publish and use my widget’s css (and believe me it’s sooo beautiful with colors ).
Please, can anyone tell me if I’ve done something wrong ? is there some initialization that I missed ? or is it really an error in the documentation ?
Thanks for your help