Re: How to obtain type of a widget?
- From: "Daniel Haude" <dunno stoptrick com>
- To: gtk-app-devel-list gnome org
- Subject: Re: How to obtain type of a widget?
- Date: Mon, 29 May 2006 14:25:07 +0200
On Mon, 29 May 2006 13:56:18 +0200, David NeÄas (Yeti)
<yeti physics muni cz> wrote:
First of all, are you sure you want to exclude all derived
types?
Actually, I'm not. Thanks for pointing this out;
(switch+case is not possible as types are allocated
run-time).
Yeah, that's what I thought.
But if you want to accept subclasses too:
if (GTK_IS_ENTRY(widget)) {
...
}
else if (GTK_IS...
That's the ticket. Thanks!
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]