Re: AJAX not woking in IE

2006-10-07 Thread Brian Wisti

On 10/7/06, ski.nalicio.us <[EMAIL PROTECTED]> wrote:
>
> I have been playing with AJAX/scriptaculous in cakePHP and havent had
> any problems with IE or FireFox.
>
> Have you tried the script you are working on in another browser (e.g.
> FireFox)? If you have and it worked in the other browser, check that
> your installation of IE has Javascript enabled.
>

Yep, it's always a good idea to double-check in another browser. It's
also good to show the code that's not working. If you can't (because
you'd be compromising national security or whatever), at least let
folks know what you're trying to do and what AjaxHelper methods you're
trying to use. That's assuming you're using the AjaxHelper, but for
all we know you're handwriting code on little pieces of paper and
taping it to the monitor.

This is sounding *much* snarkier than I intended. Rest assured, I've
asked questions the same way many times in the past in a number of
public forums, and been told pretty much the same thing: give us code,
and give us a detailed description.

Kind Regards,

Brian Wisti
http://coolnamehere.com/

--~--~-~--~~~---~--~~
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: CakePHP Test Suite -- 'Inflector' not found

2006-09-28 Thread Brian Wisti

On 9/28/06, Sonic Baker <[EMAIL PROTECTED]> wrote:
> Hi Brian, maybe this will be of hekp to you:
> http://groups.google.ie/group/cake-php/browse_thread/thread/8815708bcb1c8b/c054815ad5d09804?lnk=gst&q=test+suite&rnum=1#c054815ad5d09804
>
>  Cheers,
>
>  Sonic
>

It was helpful, but not in the way I expected. I got a 404 when I
tried for /tests/, so I took a closer look at my setup. I eventually
realized that I never got around to changing "AllowOverride None" to
"AllowOverride All" in my conf file for localhost when I added this
new Cake App.

Such a small thing, but so very important!

Then there was a minor issue with the test links going nowhere: "Core
Test Cases" went to '/cases' from '/tests', although the links were
correct if I first manually went to '/tests/cases'. My temporary
workaround was to change $groups and $cases on line 208-209 of
/app/tests/tests.php to:

$groups = '/tests/?show=groups';
$cases = '/tests/?show=cases;

Not an ideal workaround, I'm sure, but it works. I can access my tests
from /tests/ and no more worries about undefined constants.

Now that everything is basically working as advertised, it looks like
I'm going to experiment with the ModelUnitTestCase class at
http://cakephp.org/pastes/show/99b95734fbb3b5a90d9b20adbc381aa9 to
streamline the test database interaction.

Kind Regards,

Brian Wisti
http://coolnamehere.com/

--~--~-~--~~~---~--~~
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: CakePHP Test Suite -- 'Inflector' not found

2006-09-28 Thread Brian Wisti

On 9/28/06, Sonic Baker <[EMAIL PROTECTED]> wrote:
> Hi Brian, maybe this will be of hekp to you:
> http://groups.google.ie/group/cake-php/browse_thread/thread/8815708bcb1c8b/c054815ad5d09804?lnk=gst&q=test+suite&rnum=1#c054815ad5d09804
>
>  Cheers,
>
>  Sonic
>

It was helpful, but not in the way I expected. I got a 404 when I
tried for /tests/, so I took a closer look at my setup. I eventually
realized that I never got around to changing "AllowOverride None" to
"AllowOverride All" in my conf file for localhost when I added this
new Cake App.

Such a small thing, but so very important!

Then there was a minor issue with the test links going nowhere: "Core
Test Cases" went to '/cases' from '/tests', although the links were
correct if I first manually went to '/tests/cases'. My temporary
workaround was to change $groups and $cases on line 208-209 of
/app/tests/tests.php to:

$groups = '/tests/?show=groups';
$cases = '/tests/?show=cases;

Not an ideal workaround, I'm sure, but it works. I can access my tests
from /tests/ and no more worries about undefined constants.

Now that everything is basically working as advertised, it looks like
I'm going to experiment with the ModelUnitTestCase class at
http://cakephp.org/pastes/show/99b95734fbb3b5a90d9b20adbc381aa9 to
streamline the test database interaction.

Kind Regards,

Brian Wisti
http://coolnamehere.com/

--~--~-~--~~~---~--~~
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: CakePHP Test Suite -- 'Inflector' not found

2006-09-27 Thread Brian Wisti

A little update. I removed my CORE_PATH entry with no apparent ill
effects. I'm not sure why I thought I needed that.

The "Class not found" issues were resolved by calling use() in my test
case setUp() method. I needed both Inflector and Configure, so the call
ended up being:

uses("Inflector", "Configure");

Doesn't seem like the absolute smoothest approach, but I still have the
feeling I'm approaching this from the wrong angle.

Now there's an error message about not being able to open
"APP_PATHconfig/bootstrap.php", but I've already seen and dealt with a
similar error. I think it just needs a DS wedged in there.

Still, if anybody can offer a better way to test my models, I'd be
grateful.

Kind Regards,

Brian Wisti
http://coolnamehere.com/


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



CakePHP Test Suite -- 'Inflector' not found

2006-09-27 Thread Brian Wisti

Hi all,

I've been having a grand time learning Cake over the last few weeks,
but the fun seems to have had a hiccup now that I'm trying to
incorporate unit testing into my simple blog app. I'm not sure if it's
because I'm using Models wrong or the CakePHP test libraries wrong.
Would somebody mind helping me out with a little advice or happy link?

This is just an exploration of testing via CakePHP, so the model and
test are both pretty minimal:

post.php:



post.test.php:

Post = new Post();
}

/**
 * Sanity check that basic post functionality works.
 */
function testPost()
{
$data = array(
'posted'  => '01/05/2005',
'title'   => 'Dude!',
'content' => "Where's my car?"
);
$this->assertTrue($this->Post->save($data), "New post saved.");
}
}

?>

But the error message completely throws me off:

CakePHP Test Suite v 1.0.0.0
Individual test case: models/post.test.php

Fatal error: Class 'Inflector' not found in
/home/brianwisti/coolnamehere/cake/basics.php on line 144

Now, I did have to define CORE_PATH in app/tests/tests.php

if (!defined('CORE_PATH')){
define('CORE_PATH', ROOT.DS);
}

In order to get things working at all. Should I have added another
definition in that file? I'm a little baffled at what I should be
doing to get a basic test up and running.

Kind Regards,

Brian Wisti
http://coolnamehere.com/

--~--~-~--~~~---~--~~
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: Messaging service

2006-09-13 Thread Brian Wisti

> I don't see the benefit of the extra roundtrip via the webserver?
>
> Isn't it more clear to have a cronjob execute a script directly
> instead of redirecting it through the webserver and an extra
> controller? Moreover, your ISP could impose limits on maximum
> execution time. Batch processing may very well take longer than the
> timeout.
>
> --
>   Martin Schapendonk, [EMAIL PROTECTED]

All things being equal, a cron job is probably the best solution. Then
again, an ISP might not allow cron jobs, forcing you to use a
workaround like this. And of course the workaround itself may end up
annoying them, too. There's just no pleasing some folks.

Kind Regards,

Brian Wisti
http://coolnamehere.com/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---