Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-14 Thread RosSoft

First, I'm on linux, and all the files are lowercase

Second, you're changing from PHP5 to PHP4? Because that line only works
in php5:

$this-controller = $controller;

In PHP4, you must do $this-controller = $controller;


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-14 Thread brandags

@RoSoft - so you're saying I should make all the filenames lowercase?
Does that mean I need to use lowercase class names as well?

class myformComponent extends Object

You bring up a good point. I'm running PHP5 on my Windows machine, but
I need to tweak an .htaccess parameter to get PHP5 working on Linux. It
must still be running under PHP4. I'll make the change and see what it
does.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-14 Thread brandags

Hey - what do you know? That did it!  Maybe I should make it backward
compatible and use the  when assigning the controller?
Thanks for your help. It's working fine now.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-14 Thread DJ Spark

 Since CakePHP uses convention over configuration, I strongly suggest
everybody reads this chapter on the manual, again and again, and
again..
http://manual.cakephp.org/chapter/20

some examples
 ALL file names ARE lowercase  =
client_page.thtml

 Model names ARE singular, UpperCamelCased   = ClientPage
 Controller class names ARE plural, UpperCamelCased = ClientPagesController
 table names ARE plural, lower_cased_underscored  = client_pages
 foreign keys in the database are lowercase model_field = client_id

 again and again :)
 using these conventions *will* save you a lot of time.

 spark


On 6/14/06, brandags [EMAIL PROTECTED] wrote:

 @RoSoft - so you're saying I should make all the filenames lowercase?
 Does that mean I need to use lowercase class names as well?

 class myformComponent extends Object

 You bring up a good point. I'm running PHP5 on my Windows machine, but
 I need to tweak an .htaccess parameter to get PHP5 working on Linux. It
 must still be running under PHP4. I'll make the change and see what it
 does.




-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-14 Thread brandags

I think it would be helpful to update the naming conventions page
(http://manual.cakephp.org/chapter/20) to show the conventions for
components, behaviors, helpers, and elements as well.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-14 Thread brandags

Okay. Maybe it would be good to state that they're the same (in the
manual) so people don't get confused or think their might be a
different convention for a component or helper. Just a thought.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-13 Thread brandags

I've written a form component and helper
(http://cakeforge.org/snippet/detail.php?type=packageid=17) that work
fine in Windows, but when I upload them to Linux, I get an error.  A
variable that is being set in the component does not seem to be
available in the view, when on Linux. But it works fine in Windows. I
assume this is because of some case-sensitivity issue since Linux is
case-sensitive. Maybe I'm making a mistake with naming conventions or
using the wrong case somewhere.

Can anyone see what I'm doing wrong in my declarations?

/controllers//components/myform.php
class MyformComponent extends Object
{
function startup( $controller )
{
$validations = array() ;
foreach( $controller-modelNames as $model )
{
$validations += $controller-$model-validate ;
}

$this-controller = $controller;
$this-controller-set( 'formData', array(
'validations' = $validations,
'data' = $this-controller-data )
);
}
}

/controllers/photographers_controller.php
class PhotographersController extends AppController
{
var $name = 'Photographers'; // for PHP4
var $helpers = array('Html', 'form', 'Myform','Javascript', 'Error');
var $components = array('Myform');
...
}

/views/helpers/myform.php
class MyformHelper extends FormHelper
{
...
}

/views/photographers/add.thtml
? pr($formData); ?

The view is where the error is - I only showed the line with the
problem.  Here is the error message:

Notice: Undefined variable: formData in
/.../app/views/photographers/add.thtml on line 12

I have debugged it enough to know that the component's startup()
function is running and that $formData is getting set in the component
(a pr() inside the startup function shows the $formData variable full
of data), but somehow the variable $formData doesn't seem to be getting
to the view in Linux.  Any ideas what would be causing this?

Thanks,
Brandon


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Naming Conventions and Case Sensitivity (Linux Windows)

2006-06-13 Thread Grant Cox

As you say, the problem will probably be case sensitivity - which is a
filesystem issue.  So, ensure that the file names have the same case as
what you are including - from what you've posted above your helper and
component should be Myform.php (capital M), as this is what you have in
your $helpers and $components arrays.

HTH,
Grant Cox


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---