Hello All,

I am building an application which will communicate through REST with
the interface, and so all of my output messages/data will be encoded
into json to be feeded into the interface. I have created an AppError
class to have my app specific errors (and ultimately all errors)
encoded into json. The problem I am having is using the Javascript
helper (so that i can easily do echo $javascript->object($messages);)
I tried the normal approach of having a $helpers=array('Javascript');
property, also tried doing an App::import('Javascript'); (inside the
error method) which gave me this error: Fatal error: Class 'AppHelper'
not found in /Users/csueiras/Sites/loc-app/cake/libs/view/helpers/
javascript.php on line 33

Can anyone point me in the right direction?


Christian

This is my code:

<?php
class AppError extends ErrorHandler {
        var $helpers = array('Html', 'Form', 'Javascript');
        function jsonError($message)
        {
                $this->layout = 'ajax';
                $error = array ('type' => 'jsonError', 'message' => $message);

                $this->controller->set('error', $error);
                $this->_outputMessage('json_error_message');
        }
}
?>
--~--~---------~--~----~------------~-------~--~----~
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