invalid cast from `GtkComboBoxEntry' to `GtkEntry'
来源:互联网 发布:python 优点 编辑:程序博客网 时间:2024/04/28 05:19
Date: Tue, 20 Jul 2004 23:50:07 GMT
Thanks, that solved my problem.
On Tue, 20 Jul 2004 23:32:08 +0000, Andrew Taylor wrote:
> Claire wrote:
>
>> I'm using a GtkComboBoxEntry widget in my app and I'm trying to get the
>> text from it using gtk_entry_get_text() because the doucmentation says to
>> use GtkEntry functions on it. The problem I having is I'm not quite how to
>> cast it. I tried GTK_ENTRY, GTK_COMBO, and even GTK_ENTRY(GTK_COMBO()),
>> but no matter I get errors like this " invalid cast from
>> `GtkComboBoxEntry' to `GtkEntry'" when attempting to read the entry.
>
>
> The docs I have
> (http://developer.gnome.org/doc/API/2.2/gtk/GtkComboBoxEntry.html) say
> to use GTK_ENTRY (GTK_BIN (combo_box_entry)->child).
>
> Note that GtkComboBoxEntry is not a descendant of GtkEntry, so you can't
> cast it to one. It is, however, a GtkBin container, which according to
> the docs, should contain a GtkEntry. So, as shown above, you need to
> downcast it to a GtkBin and grab the first child.
>
> You might also want to refer to the GTK+ object hierarchy:
> http://developer.gnome.org/doc/API/2.2/gtk/ch01.html
- invalid cast from `GtkComboBoxEntry' to `GtkEntry'
- error: invalid cast from type _gnu_cxx::__normal_iterator<> to unsigned char*
- Cannot cast from ActionForm to XXForm 解决办法
- Cannot cast from View to ProgressBar解决办法
- Cannot cast from View to CheckBox
- Cannot cast from Double to Integer
- cast from 'void *' to 'int' loses precision
- Cannot cast from Fragment to NewsContentFragment
- invalid conversion from `const char*' to `char*'
- invalid conversion from 'const char*' to 'char*'
- invalid conversion from `const char*' to `char*' .
- invalid conversion from 'const char*' to char*
- invalid conversion from 'void* (*)()' to 'void* (*)(void*)'
- invalid conversion from 'const char*' to 'char*'
- invalid conversion from `void*' to `SeqList*
- invalid conversion from `const char*' to `char*'
- invalid conversion from ‘void*’ to ‘void* (*)
- warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]错误
- 探索式测试的一些小方法
- BloomFilter——大规模数据处理利器
- jquery ajax
- NYoj 21 三个水杯 广搜
- QtSharedMemory——Qt程序之间的内存共享机制
- invalid cast from `GtkComboBoxEntry' to `GtkEntry'
- Linux下ORACLE乱码问题解决方法
- Android开发之.9文件(图解)
- 本人需要一个师父
- POJ 2075 Tangled in Cables(Kruskal算法)
- 设计模式——概述
- swfupload上传组件
- Android高手进阶教程(十五)---Android中万能的BaseAdapter(Spinner,ListView,GridView)的使用!
- make config解惑