Hi Samuel,

First of all I want to congratulate you for your great work on porting
Excel_write... to cakePHP. Thank you very much.

I was reading the post
http://groups.google.com/group/cake-php/msg/491be1fbca7482c9 because I
experienced some Notices during excel helper usage and this was preventing
it to generate right spreadsheets. I tried your suggestion:

var $helpers = array();

and it solved the main issue (a notice about helpers property not found).
But after it I got two other Notices:

Undefined offset:  2 [*APP\vendors\excel_writer\ExcelWorksheet.php*,
line *2478*]
Undefined offset:  3 [*APP\vendors\excel_writer\ExcelWorksheet.php*,
line *2479*]


A little investigating let me to this code (line 2478,2479 and 2491 - they
are in red):

        $rwTop   = $panes[2];
        $colLeft = $panes[3];
        if (count($panes) > 4) { // if Active pane was received
            $pnnAct = $panes[4];
        } else {
            $pnnAct = null;
        }
        $record  = 0x0041;       // Record identifier
        $length  = 0x000A;       // Number of bytes to follow

        // Code specific to frozen or thawed panes.
        if ($this->_frozen) {
            // Set default values for $rwTop and $colLeft
            if (!isset($rwTop)) {
                $rwTop   = $y;
            }


I noticed that you are testing the length of $panes only after offset 4 but
per PHP notices the offsets 2 and 3 don´t exists two. So I follow the code
until line 2491 and saw that the code is protect against a missing $rwTop
and looking foward the code test it and others everytime they are needed. At
this moment I changed the code on lines 2478 and 2479 to this:

if (isset($panes[2]))
            $rwTop   = $panes[2];
if (isset($panes[3]))
            $colLeft = $panes[3];


Now there is no more Notices or Warnings comming with debug on. If you think
this is util please post it to Cake PHP mail list since I am not a member
for now.

Again I want to thank you. This tutorial was a great help these days.

Best regards,
Benito

--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito no Grupo "Cake PHP Português" 
em Grupos do Google.
 Para postar neste grupo, envie um e-mail para cake-php-pt@googlegroups.com
 Para cancelar a sua inscrição neste grupo, envie um e-mail para [EMAIL 
PROTECTED]
 Para ver mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-BR
-~----------~----~----~----~------~----~------~--~---

Responder a