This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Potential improvements to symfony docs for 1.3/1.4 [renamed]

About symfony tutorials, symfony book and API documentation.

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by Andromeda » Wed May 26, 2010 11:21 pm

i saw that already and then the new guide too, just awesome!!!
Andromeda
Member
 
Posts: 78
Joined: Thu Jul 03, 2008 6:55 pm
Location: Berlin, Germany

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by perfectom » Fri Jul 16, 2010 2:48 pm

I understand this product is free and without guarantee. And I also understand that the community should contribute to the documentation, in the spirit of open source. What I have a problem with is that the main owners of this project must know the main documentation has completely wrong information in it. It would be a simple task to put a disclaimer on the documentation website saying 'this documentation is wrong'. Moreover, they are selling books for $40 USD with presumably this same wrong information.

I have spent a lot of time trying to figure out how to use the 1.3/4 forms system, etc. and it's almost impossible with the state of this documentation. For example, the documentation is wrong:
in http://www.symfony-project.org/gentle-introduction/1_4/en/10 -Forms , reference to method sfForm::setNameFormat:
$this->form->setNameFormat('contact[%s]');

But this method doesn't exist!


If I would have known up-front that the documentation was wrong I would have just stuck with symfony 1.0.

So I know a lot of people will get angry at this post and say 'so why don't you write documentation'. After I finish this project which I'm now struggling to finish on a tight deadline because of this documentation, I will. Also I really appreciate the developers efforts here, it's a fantastic product (if I can just figure out how to use it). But I would appreciate if the website was also a little more honest and forthcoming about the state of the documentation, currently it's very misleading. In my opinion 1.3/1.4 is not production ready if the documentation is wrong.

Thank you, -Tom
perfectom
Junior Member
 
Posts: 3
Joined: Fri Jul 16, 2010 2:27 pm

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by halfer » Fri Jul 16, 2010 3:10 pm

Documentation can always be improved upon, sure. I think this is just a mistake, rather than being out of date. The method is for the widgetSchema, so I think you can do:

Code: Select all
$this->form->widgetSchema->setNameFormat( ... );

That said, I think you should do this in the form itself, rather than in the action.

Would be so kind as to raise a ticket? Hopefully then it will get seen to. Thanks.

http://trac.symfony-project.org/timeline
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by perfectom » Fri Jul 16, 2010 3:27 pm

halfer, thanks for the fast update. I tried that, but it's a protected class property.


So I tried:
$this->form->getWidgetSchema()->setNameFormat('reserve[%s]');

but the 'reserve[name]' array is not being rendered in the form, still just 'name'.

thanks again -Tom
perfectom
Junior Member
 
Posts: 3
Joined: Fri Jul 16, 2010 2:27 pm

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by halfer » Fri Jul 16, 2010 3:29 pm

It definitely works if you do it inside the configure() method of the form itself, and I think that's a more encapsulated way to do it anyway. I know that approach works, since it's in the Jobeet tutorial, I've done that page, and it works on my machine :D~ :-D~ :grin:
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by perfectom » Fri Jul 16, 2010 3:46 pm

ok, it doesn't work on my machine, no clue then. Thanks for your help here, though. I'm sorry but I'm really getting ready to give up on symfony, i'm jumping around between tutorials and docs and forums with 5 ways to do the same thing. It almost would be faster for me to learn a different framework :(~ :-(~ :sad:
perfectom
Junior Member
 
Posts: 3
Joined: Fri Jul 16, 2010 2:27 pm

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by halfer » Fri Jul 16, 2010 3:51 pm

I honestly don't think it will be faster to learn a different framework, and I don't say that out of any "Symfony protectionism" - everyone should use what works best for them. But if you switch to another framework you will, at some point, hit a problem with that also. Eventually you will run out of frameworks to give up on.

The key is, of course, not to give up. This is not the right thread to get into what's going wrong with your system, so I suggest you post a new thread in the 1.3/1.4 forum, and describe your problem.

Please raise that ticket on the error you spotted - it will help make symfony even better!
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Potential improvements to symfony docs for 1.3/1.4 [renamed]

by matt2314 » Mon Aug 02, 2010 12:24 am

Hi,

Just came across this thread because I had the same problem with
$this->widgetSchema->setNameFormat('myform[%s]');

If you put it in the the form's configure method you have to add it at the bottom, after you set the widgets. Not sure why that is but that solved my form problems.

Cheers
matt2314
Junior Member
 
Posts: 6
Joined: Fri Sep 11, 2009 8:01 pm

Re: Potential improvements to symfony docs for 1.3/1.4 [rena

by gorillapower » Wed Aug 18, 2010 11:47 pm

This worked for me.

Problem:
I also got 'setNameFormat() on a non-object error' and the undefined method error when using
Code: Select all
$this->form->setNameFormat('Contact[%s]');
 $this->widgetSchema->setNameFormat('Contact[%s]');

What happens is that when sfForm instance is created it in turn creates a sfWidgetFormSchema instance. But this instance is protected.

Solution:
A simple getter method worked for me.

Code: Select all
$this->form->getWidgetSchema()->setNameFormat('contact[%s]');
User avatar
gorillapower
Junior Member
 
Posts: 7
Joined: Tue Aug 10, 2010 4:59 pm

Re: Potential improvements to symfony docs for 1.3/1.4 [rena

by bigbee999 » Tue Nov 01, 2011 12:24 am

In the case of a real estate short sale, the mortgage loaner or the bank will give consensual agreement to rebate a borrowers loan balance simply because of or due to any serious economic or financial adversity on the side of the loan or mortgage borrower. The householder/debtor can then proceed to sell the property for a little or even far less than the owed outstanding and still due balance left on the loan.


Utah short sale
Utah short sale help
Utah foreclosure help
bigbee999
Junior Member
 
Posts: 1
Joined: Tue Nov 01, 2011 12:21 am