Re: Tree Problems
- From: Gavin Jefferies <gj262 yahoo com>
- To: Pozsar Balazs <pozsy uhulinux hu>
- Cc: Jens Wilke <jens wilke org>, <gtk-perl-list gnome org>
- Subject: Re: Tree Problems
- Date: 12 Sep 2002 10:58:28 -0700
Pozsar Balazs <pozsy uhulinux hu> writes:
On Wed, 11 Sep 2002, Jens Wilke wrote:
On Wednesday 11 September 2002 20:11, Sebastian Weitzel wrote:
Hi,
1. Problem: how can I find out if $parent is a TreeItem or a Subtree, to
if(substr($parent, 0, 13) eq "Gtk::TreeItem") {print "\$parent is a treeitem"}
BRrrrrr.... A much cleaner solution:
if (ref $parent eq "Gtk::TreeItem") {
print "it is a treeitem.\n";
Or to cover inheritance:
if ($parent->isa('Gtk::TreeItem')) {
print "it is a treeitem.\n";
}
}
--
pozsy
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]