473,395 Members | 1,418 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Call to a member function on a non-object

Could someone please look at this code and tell me wht is going on?
This program dies on the "****" line with:
Fatal error: Call to a member function on a non-object in
/www/cgi-bin/pivot.php on line 33

But AFAICT it is absolutely identical to the shape that went before....

What am I missing?

$m = new SWFMovie();
$m->setDimension(2400,2400);
$m->setBackground(0, 0x66, 0x66);
$m->setRate(24.0);

$hit = new SWFShape();
// bug: have to declare all line styles before you use them
$hit->setLine(40, 0x7f, 0x00, 0x00);
$hit->setLine(40, 0x00, 0x66, 0x66);
$hit->setLine(40, 0, 0x7f, 0);
//$hit->setRightFill($hit->addFill(0,0,0));
$hit->movePenTo(1200,1200);
$hit->setLine(40, 0x7f, 0, 0);
$hit->drawCircle(1000);

$ps = new SWFShape();
$ps->movePenTo(0,0);
$ps->setLine(40, 0x7f, 0, 0);
$ps->drawLine(1000, 0);

$c1 = new SWFShape();
$c1->movePenTo(250,0);
$cl->setLine(40, 0x7f, 0, 0);************************
$c1->drawCircle(50);
Mar 2 '06 #1
2 2103
s
On Wed, 01 Mar 2006 17:03:51 -0800, Captain Dondo
<ya*@NsOeSiPnAeMr.com> wrote:
Could someone please look at this code and tell me wht is going on?
This program dies on the "****" line with:
Fatal error: Call to a member function on a non-object in
/www/cgi-bin/pivot.php on line 33

But AFAICT it is absolutely identical to the shape that went before....

What am I missing?
[snip]
$c1 = new SWFShape();
$c1->movePenTo(250,0);
$cl->setLine(40, 0x7f, 0, 0);************************
$c1->drawCircle(50);


The object's name is $c1 (cee-one) but you've typo'd it as $cl
(cee-ell).

hth

--
<s@guerril.la.ape> (to email, remove .ape)
Apologies for the ad below.
--

*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
Mar 2 '06 #2
s wrote:
The object's name is $c1 (cee-one) but you've typo'd it as $cl
(cee-ell).
DUH!!!!!
hth


Yes it did......
Mar 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Erik Haugen | last post by:
From reading gotw#84 (http://www.gotw.ca/gotw/084.htm), I'm convinced that I should try to make functions nonfriend nonmembers when practical, but then I came across this: Bruce Eckel says about...
2
by: dmitry.freitor | last post by:
Why would someone call a non-static provate member function from another non-static member function of the same class via the this pointer? Thanks. DF
7
by: Ook | last post by:
What am I doing wrong? This code gives a compile error: 'SortedList<T>::insert' : illegal call of non-static member function. I've tried several variations of this, but keep getting the same error....
8
by: nsharma78 | last post by:
Hi, I have a code as follows: class A { public: void print(){cout << "Magic" << endl;} };
10
by: shanknbake | last post by:
I'm getting the following compile-time error: error C2352: 'Person::getCount' : illegal call of non-static member function Here is my getCount function declaration:...
4
by: archimed7592 | last post by:
Hi. for example i have base class A and dirved class B: struct A { virtual void f() { std::cout << "A::f()" << std::endl; } }; struct B : public A {
20
by: Bruce. | last post by:
I am trying to call a member function through a pointer to it and can't get the syntax exactly right. This compiles with an error C2064, term does not evaluate to a function taking 1 argument.. ...
6
by: Fabian Wein | last post by:
Hi, is there a way to call a const function from non const function? I have a non-const List GetList(); and want my
3
by: Pawel_Iks | last post by:
I have following class definition (A.h file): class A { public: int N; int count1(int n) {n++;} int count2(int n) {n+=5;} int otherFun(int n, int (*fun)(int)); }
4
by: l.s.rockfan | last post by:
Hello, how do i have to call an inherited, templated class constructor from the initializer list of the inheriting, non-templated class constructor? example code: template<typename T>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.