Re: More questions...
| From: | Andrei Zmievski | Date: | Tue, 19 Jun 2001 13:50:54 +0000 |
| Subject: | Re: More questions... | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1925@lists.php.net to get a copy of this message | ||
It's very simple. See below.
On Mon, 18 Jun 2001, Julia A. Case wrote:
> I think this may be more of a php issue than a gtk one, but here goes...
>
> If someone has time to take 5 minutes and look at a small applet I wrote
> and can't seem to find the error I would appreciate it... I'll include
> the code as attachments...
>
> on line 37 of cube_main.php I get a "Call to member function on a
> non-object in...." The trouble is I had just called another member
> function on the line above... I've looked over this for hours and think
> I'm missing something simple.
>
> Thanks in advance,
> Julia
>
> --
> [ Julia Anne Case ] [ Ships are safe inside the harbor, ]
> [Programmer at large] [ but is that what ships are really for. ]
> [ Admining Linux ] [ To thine own self be true. ]
> [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
>
> <?php
>
> include('hyperCube.php');
>
> if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
> dl('php_gtk.dll');
> else
> dl('php_gtk.so');
>
> $cont_x=true;
> $cont_y=true;
> $cont_z=false;
> $cont_w=false;
>
> $m_hyperCube = &new hyperCube();
>
> function destroy()
> {
> Gtk::main_quit();
> }
>
> function delete_event()
> {
> return false;
> }
>
> function draw_screen ($drawingarea, $event)
> {
You forgot "global $m_hyperCube" here.
-Andrei
"Claiming Java is easier than C++ is like
saying that K2 is shorter than Everest."
-- Larry O'Brien (editor, Software Development)