Re: Combo Boxes
- From: David Odin <David Odin bigfoot com>
- To: Brooklyn Linux Solutions <ruben mrbrklyn com>, gtk-app-devel-list gnome org
- Subject: Re: Combo Boxes
- Date: Thu, 31 May 2001 23:57:15 +0200
On Wed, May 30, 2001 at 10:11:05PM -0400, Brooklyn Linux Solutions wrote:
I'm getting a warning on this compile on the following line:
GtkWidget * entry;
combo = gtk_combo_new();
entry = GTK_ENTRY(GTK_COMBO(combo)->entry);
combobox.c:35: warning: assignment from incompatible pointer type
Which looks pretty normal to me. You've declared entry as a
GtkWidget *. And GTK_ENTRY() returns a GtkEntry *...
I assume the GTK_ENTRY casts the wrong kind of point, although an entry is
a
GtkWidget * and so I've declared the variable entry.
Can I cast the expression: GTK_ENTRY(GTK_COMBO(combo)->entry);
like
GTK_WIDGET(GTK_ENTRY(GTK_COMBO(combo)->entry))
Certainly you can. But what's the point?
The 'entry' field of a GtkCombo is a GtkWidget *.
So you can do your assignment above just like this:
entry = GTK_COMBO(combo)->entry;
Ruben
--
Brooklyn Linux Solutions
http://www.mrbrklyn.com
http://www.brooklynonline.com
Your mail server has been fixed?
DindinX
--
David Odin bigfoot com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]