print_r and debugging php-gtk objects
| From: | Jake Gordon | Date: | Mon, 11 Jul 2005 17:36:02 +0000 |
| Subject: | print_r and debugging php-gtk objects | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5967@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to get my head round some OO PHP here and for debugging purposes work out how PHP-GTK's objects work. I often use something like print_r($GLOBALS) or print_r($whatever) in code for debugging purposes. e.g.
---
class jakeGreat {
var $items;
function jakeGreat() {
$this->items = "10";} } $jake = new jakeGreat(); print_r($jake); --- Will print: --- jakegreat Object (
[items] => 10) --- ... as I'd expect. Helps me debug. But If I use code: --- $main_title = new GtkLabel(); $main_title->set_text("Some title"); print_r($main_title); --- it simply prints: --- GtkLabel Object (
[0] => 9) --- ... which isn't very useful. So how do I debug with GtkObjects? And how can I get a list of all gtk objects which currently exist? And the values within them? Jake.