Re: Querying about the type of a given widget
- From: "Randy J. Ray" <rjray redhat com>
- To: "Cogan, Gil" <gil cogan intel com>
- Cc: "'gtk-perl-list gnome org'" <gtk-perl-list gnome org>
- Subject: Re: Querying about the type of a given widget
- Date: Wed, 03 Jan 2001 12:01:53 -0800
"Gil" == Cogan, Gil <gil cogan intel com>
wrote the following on Wed, 3 Jan 2001 09:29:39 -0800
Gil> my $widget = pop @widgets; if $widget is an entry widget do this
Gil> else do that.
All widgets are objects (i.e., blessed references), so you should be able
to do:
if (ref($widget) eq 'Gtk::Entry') {}
or similar.
Randy
--
-------------------------------------------------------------------------------
Randy J. Ray | Programming is a Dark Art [...] The programmer is fighting
rjray redhat com | against the two most destructive forces in the universe:
415-777-9810 x246 | entropy and human stupidity. --Dr. Damian Conway
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]