X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/62a1e1a38321f11eeb36f8e2ade9bc0ee91084b4..16ec4547406edcae627dd3ec4bdc448ef605b11a:/viewer/main.cpp?ds=sidebyside diff --git a/viewer/main.cpp b/viewer/main.cpp index 1cee643..f7e4d5d 100644 --- a/viewer/main.cpp +++ b/viewer/main.cpp @@ -68,7 +68,8 @@ int main(int argc, char *argv[]) area.add (canvas); hbox.pack_start (area); - hbox.pack_end (frame, true, true, 10); + hbox.pack_start (frame, false, false, 10); + frame.set_size_request (200, 200); Glib::RefPtr actiongroup = Gtk::ActionGroup::create(); @@ -133,7 +134,11 @@ void nuevo_arbol () double l = Random::Double (0.0f, 1.0f); std::cout << l << " >= " << paltas << std::endl; if (l >= paltas) { - tree->AddKey (c); + try { + tree->AddKey (c); + } catch (Exception *e) { + std::cout << "====== " << (std::string)c << e->Message () << std::endl; + } i++; } else { /* Tengo que borrar una clave entre 0 e "i" de la lista @@ -164,7 +169,11 @@ void nuevo_arbol () while (it != lst.end ()) { ClaveVariable c(*it); - tree->AddKey (c); + try { + tree->AddKey (c); + } catch (Exception *e) { + std::cout << "====== " << (std::string)c << e->Message () << std::endl; + } it++; } }