> Did you try this in your index controller (assuming you are using 1.2):
>
> App::import('Helper', 'Time');
> $timeHelper = new TimeHelper;

No, I have not tried that.  I am using 1.2.  It still does not work
though. Here's my code:

controller:
class ScriptsController extends AppController {
        function index() {
                App::import('Helper', 'Time');
                $timeHelper = new TimeHelper;
                $this->set('scripts', $this->Script->find('all'));
        }
[...]

View:
[...]
<td><?php echo $timeHelper->nice($script['Script']['created']); ?></
td>
[...]

I got this error though:
Notice (8): Undefined variable: timeHelper [APP\views\scripts
\index.ctp, line 31]

> If you seriously think that having the Time helper included when your
> controller is loaded and being available for every action will reduce
> the speed of the application in any appreciable way, I doubt your
> ability to determine the choke points of an application.

If it does not slow it down why don't all the helpers just all get
loaded automatically?  I mean, the Time helper is 538 lines of code.
It must slow it down to load that into RAM and deal with it.

Thanks,
Jonah
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to