I've seen this helper in thebakery (ExcelWriter)
http://bakery.cakephp.org/articles/view/generate-excel-spreadsheets-from-your-database

and I tried using it in my application.

However, when I tried to include the helper in my app with this line:
        var $helpers = array('Html', 'Form','Excel');

I get the following notice:

Notice (8): Undefined property: ExcelHelper::$helpers [CORE\cake\libs
\view\view.php, line 748]
View::_loadHelpers() - CORE\cake\libs\view\view.php, line 748
View::_render() - CORE\cake\libs\view\view.php, line 633
View::render() - CORE\cake\libs\view\view.php, line 372
Controller::render() - CORE\cake\libs\controller\controller.php, line
744
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 262
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213
[main] - APP\webroot\index.php, line 90


Here is the line where the notice occurred:

$loaded[$helper]->validationErrors = $this->validationErrors;
}
if (is_array($loaded[$helper]->helpers) && !empty($loaded[$helper]-
>helpers)) { //this is highlighted in yellow



Here is the context of the notice:

$loaded =       array(
        "Html" => HtmlHelper
HtmlHelper::$tags = array
HtmlHelper::$base = "/testing"
HtmlHelper::$here = "/testing/salesScreen"
HtmlHelper::$params = array
HtmlHelper::$action = "index"
HtmlHelper::$data = NULL
HtmlHelper::$_crumbs = array
HtmlHelper::$__docTypes = array
HtmlHelper::$helpers = NULL
HtmlHelper::$webroot = "/testing/"
HtmlHelper::$themeWeb = NULL
HtmlHelper::$plugin = NULL
HtmlHelper::$namedArgs = NULL
HtmlHelper::$argSeparator = NULL
HtmlHelper::$validationErrors = NULL
HtmlHelper::$__tainted = NULL
HtmlHelper::$__cleaned = NULL
HtmlHelper::$_log = NULL,
        "Form" => FormHelper
FormHelper::$helpers = array
FormHelper::$fieldset = array
FormHelper::$__options = array
FormHelper::$fields = array
FormHelper::$requestType = NULL
FormHelper::$base = "/testing"
FormHelper::$webroot = "/testing/"
FormHelper::$themeWeb = NULL
FormHelper::$here = "/testing/salesScreen"
FormHelper::$params = array
FormHelper::$action = "index"
FormHelper::$plugin = NULL
FormHelper::$data = NULL
FormHelper::$namedArgs = NULL
FormHelper::$argSeparator = NULL
FormHelper::$validationErrors = NULL
FormHelper::$tags = array
FormHelper::$__tainted = NULL
FormHelper::$__cleaned = NULL
FormHelper::$_log = NULL
FormHelper::$Html = HtmlHelper object,
        "Excel" => ExcelHelper
ExcelHelper::$workbook = ExcelWriter object
ExcelHelper::$worksheets = array
ExcelHelper::$formats = array
ExcelHelper::$font = "Arial"
ExcelHelper::$size = 10
ExcelHelper::$align = "left"
ExcelHelper::$valign = "vcenter"
ExcelHelper::$bold = 0
ExcelHelper::$italic = 0
ExcelHelper::$_filename = NULL
ExcelHelper::$_parser = NULL
ExcelHelper::$_1904 = NULL
ExcelHelper::$_activesheet = NULL
ExcelHelper::$_firstsheet = NULL
ExcelHelper::$_selected = NULL
ExcelHelper::$_xf_index = NULL
ExcelHelper::$_fileclosed = NULL
ExcelHelper::$_biffsize = NULL
ExcelHelper::$_sheetname = NULL
ExcelHelper::$_tmp_format = NULL
ExcelHelper::$_worksheets = NULL
ExcelHelper::$_sheetnames = NULL
ExcelHelper::$_formats = NULL
ExcelHelper::$_palette = NULL
ExcelHelper::$_url_format = NULL
ExcelHelper::$_codepage = NULL
ExcelHelper::$_country_code = NULL
ExcelHelper::$_tmp_dir = NULL
ExcelHelper::$_string_sizeinfo_size = NULL
ExcelHelper::$_BIFF_version = 1280
ExcelHelper::$_byte_order = NULL
ExcelHelper::$_data = NULL
ExcelHelper::$_datasize = NULL
ExcelHelper::$_limit = NULL
ExcelHelper::$base = "/testing"
ExcelHelper::$webroot = "/testing/"
ExcelHelper::$here = "/testing/salesScreen"
ExcelHelper::$params = array
ExcelHelper::$action = "index"
ExcelHelper::$data = NULL
ExcelHelper::$themeWeb = NULL
ExcelHelper::$plugin = NULL
)
$helpers        =       array(
        "Html",
        "Form",
        "Excel",
        "Paginator",
        "Session"
)
$parent =       null
$helper =       "Excel"
$i      =       2
$options        =       array()
$plugin =       null
$helperCn       =       "ExcelHelper"
$isLoaded       =       false
$vars   =       array(
        "base",
        "webroot",
        "here",
        "params",
        "action",
        "data",
        "themeWeb",
        "plugin"
)
$c      =       8
$j      =       8

It is very annoying to see this notice every time I set my
cakephp debug level to 2. Any idea on why this notice
occurs? Has anyone found a workaround to remove the
said notice?


Please help. I know that there is always someone there
in the cakephp community to count in to.



Thanks,

Mario




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