Re: Querying about the type of a given widget

"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 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]