Bonob + OAF problem
- From: Valéry Febvre <vfebvre easter-eggs com>
- To: gnome-components-list gnome org
- Subject: Bonob + OAF problem
- Date: Thu, 20 Jul 2000 01:47:58 +0200
I have tried to compile a very simple program which open on a Gnome
window and which call the component Bonobo-clock.
The compile is OK
But when I run it, I have always the same mistake.
reload
Trying dir /usr/local/share/oaf
Trying dir /usr/local/share/oaf
** CRITICAL **: file oaf-activate.c: line 123 (oaf_activate_from_id):
assertion `ac' failed.
Impossible de creer le Control Bonobo
GnomeUI-CRITICAL **: file gnome-app.c: line 299
(gnome_app_set_contents): assertion `contents != NULL' failed.
I use:
ORBit 5.2
Bonobo 0.15 CVS
OAF 0.4 CVS
Thanx in advance.
THE SOURCE CODE:
1) bonobo-oaf.c
#include <gnome.h>
#include <bonobo.h>
#include <liboaf/liboaf.h>
gboolean show_component(gpointer user_data) {
GtkWidget *app;
GtkWidget *bonobo_control;
gchar bonobo_name[] =
"OAFIID:bonobo_clock:d42cc651-44ae-4f69-a10d-a0b6b2cc6ecc";
app = GTK_WIDGET(user_data);
bonobo_control = bonobo_widget_new_control(bonobo_name, NULL);
if (bonobo_control == NULL)
g_print("Impossible de creer le Control Bonobo\n");
gnome_app_set_contents(GNOME_APP(app), bonobo_control);
gtk_widget_show_all(app);
return FALSE;
}
int main(int argc, char *argv[]) {
GtkWidget *app;
CORBA_Environment ev;
CORBA_ORB orb;
CORBA_exception_init(&ev);
gnome_init("Bonobo : exemple 1", "1.0", argc, argv);
orb = oaf_init(argc, argv);
if(bonobo_init(orb, NULL, NULL) == FALSE)
g_error("Impossible d'initialiser Bonobo");
app = gnome_app_new("Bonobo : test", "Bonobo : test");
gtk_widget_set_usize(app, 200, 150);
gtk_idle_add((GtkFunction) show_component, app);
bonobo_main();
return 1;
}
2) Makefile
CFLAGS=-Wall `gnome-config --cflags gnomeui gnorba`
LD_FLAGS=`gnome-config --libs gnomeui gnorba`
BONOBO_OAF_FLAGS = -L/usr/local/lib -L/usr/lib -loaf -lbonobo
-lORBitCosNaming -lORBit -lIIOP -lORBitutil -lglib -lm
all : bonobo-oaf
bonobo-oaf : bonobo-oaf.o
gcc $(CFLAGS) -o bonobo-oaf bonobo-oaf.o $(LD_FLAGS)
$(BONOBO_OAF_FLAGS)
clean:
rm -f *~ *.o bonobo-oaf
--
_\\|//_
(-0-0-)
---------------------------------------ooO-(_)-Ooo------------
Easter-eggs GNU/Linux specialist
17 bis rue du Dr Zamenhof - 92500 Rueil Malmaison - France
Phone: +33 (0) 1 41 29 10 01 - Fax: +33 (0) 1 41 29 11 71
mailto:vfebvre@easter-eggs.com - http://www.easter-eggs.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]