Re: [gtkmm] Searching object into a box
- From: "Marcelo E. Magallon" <marcelo magallon bigfoot com>
- To: GTKMM Mailing List <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Searching object into a box
- Date: Thu, 5 Sep 2002 13:32:09 +0200
>> Javier Vilarroig <jvilarroig terra es> writes:
> do
> {
> DUMP("A1");
> Gtk::Object* objetoActual = dynamic_cast<Gtk::Object
> *>((*listaClaves)->get_widget());
> DUMP("A2");
> // Comprueba si es una Box, si lo es, la aplica tambien
> if(Gtk::Box::isA(objetoActual))
> {
> DUMP("Es una Box!!");
> }
> } while ((listaClaves++) != finClaves);
The usual idiom is:
for(iter = iterList.begin(); iter != end; ++iter)
{
// do something interesting
}
with your code you are entering the loop without checking if you are
already at the end of it (e.g., if a box has no children). The fact
that you are segfaulting inside get_widget() may indicate that your
underlying pointer is not valid.
HTH,
Marcelo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]