On Tue, 13 May 2008 09:44:07 +0200
Fabien POTENCIER <[EMAIL PROTECTED]> wrote:

> 
> Christian Hammers wrote:
> > Hello
> > 
> > I'm trying to lean symfony1.1 forms and am slowed down because the
> > usual "ctrl-space" auto completion of my IDE (eclipse) does not
> > reveal which options an object accepts. Example:
> >     $this->widgetSchema['tax']->setAttribute('size', 3);
> > instead of
> >     $this->widgetSchema['tax']->setSize(3);
> 
> This would mean that we need to list all possible HTML attributes.

Oups, I meant setOption(), not setAttribute() here - the one that sets 
the things like 'can_be_empty' on selectbox widgets.


> > If the latter would be possible I could browse through the list of setters
> > and "see what it's offering".
> > 
> > Also the IDE would automatically mark non existent functions where as 
> > typos like "siz" are now only detected at runtime.
> > 
> > What was the design decision for setAttribute()? Just to get quickly done
> > and leave the tedious work of writing all the getters and setters for
> > later? :)
> > 
> > BTW: Using __set(), __get() and the "// @property mixed $size" PHPdoc 
> >      feature would maybe be an alternative as it gives at least
> >      auto completion (at least if not then it's the IDEs fault :))
> 
> __set() and __get() will never be used by an IDE.

But the following comment line could suggest the IDE that there is a 
property even if it's not explicitly declared via private or public:

     class sfWidgetFormPropelSelect {
        // @property mixed $can_be_empty


bye,
 
-christian-

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to