View Full Version : This is a new on to me: Call to a member function CellValue() on a non-object

06-26-2010, 08:41 PM

I got this nifty little error

Fatal error: Call to a member function CellValue() on a non-object in /var/www/mrbiggz.kicks-***.net/httpdocs/font-test/test.html on line 98

Lines 97-98 respectively in the script are
$cellData = $FontName[1] . '&nbsp;&nbsp;<a href="#" rel="toggle[' . strtolower($FontName[0]) . ']" data-openimage="minus.png" data-closedimage="plus.png"><img src="minus.png" border="0" /></a>';
$ftm->CellValue($tblRow, $col, $cellData );

The function in the class CellValue looks like this
function CellValue($row, $col, $value='')
if ($row < 0|| $col < 0){$this->SpeakError("WhisperTable::CellValue() -- invalid row/col indicated");}
$this->Expand($row, $col);
$this->TheTable['rows'][$row]['cols'][$col]['value'] = $value;

To the best of my knowledge all my quotes match up. Not really sure what causes this fatal error. Then again I've never seen this error before! Please help! Could you please explain to me what I did wrong so the next time I see something like this I have an idea of what to look for?!

Thanks in advance! :D

06-26-2010, 09:19 PM
Where do you define $ftm?

06-26-2010, 11:59 PM
Where do you define $ftm?

Sir .. I thank you and so do my blind eyes! Four lines of my code were missing! Not sure how .. but the vanished some where along the line! I put them back in and vio'la it works!!!

I guess this was the most important part!

$ftm = new WhisperTable('fontMenu');