[pygtk] bonobo control problem

2005-10-05 Thread Peter Parente
Hi,

I'm trying to execute the ClockControl demo found in Martin Grimme's
Python bonobo tutorial (http://www.pycage.de/howto_bonobo.html). No
matter what I try to do, the client test code hangs indefinitely when
I run it. If I kill the instance of the server, the client quits with
the following message:

(test_client.py:4282): Bonobo-WARNING **: Activation exception 'Child
process did not give an error message, unknown failure occurred'
Traceback (most recent call last):
  File "test_client.py", line 8, in ?
control = bonobo.ui.Widget("OAFIID:ClockControl:www.pycage.de", o)
application finalize called

I've used the bonobo-browser util to ensure the server component and
factory are registered properly. I tested the server code standalone
to ensure the code has no syntax errors and an object instance is
returned properly by the factory function. The code keeps hanging in
that one line.

Has anyone else experienced bonobo problems? I'm using PyGTK version
2.7.0 on Gnome 2.10.

Thanks,
Pete
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Bonobo and Python

2004-02-11 Thread Girish Wadhwani

No such luck. I get: 
Traceback (most recent call last):
  File "./bonobo-test.py", line 8, in ?
"IDL:Bonobo/Control:1.0")
Bonobo.InterfaceNotFound

However, 
 gwom $ activation-client -q --spec="has (repo_ids,
'IDL:Bonobo/Control:1.0')" | grep '^IID'
IID OAFIID:Gst_Player_View, type factory, location
OAFIID:Gst_Player_View_Factory
IID OAFIID:GNOME_ShowDesktopApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_WindowListApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_TasklistApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_WorkspaceSwitcherApplet, type
factory, location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_PagerApplet, type factory, location
OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_WindowMenuApplet, type factory,
.


-Girish

>   Can you try the test program in attachment?  It
> should print an object
> reference.  For me it prints:
> 
> [emperor:tmp]$ ./test-bonobo-monikers.py
> Bonobo-Message: Stream extender:
> 'vfs:http://www.gnome.org/'
> Bonobo-Message: Attempt activate object satisfying
> 'bonobo:supported_mime_types.has ('text/html') AND
> repo_ids.has
> ('IDL:Bonobo/Control:1.0') AND repo_ids.has
> ('IDL:Bonobo/PersistStream:1.0')': 0x81e41f0
>  
> (test-bonobo-monikers.py:2836): gtkhtml-WARNING **:
> No such file or
> directory
>  
> (test-bonobo-monikers.py:2836): gtkhtml-WARNING **:
> No such file or
> directory
> 
> 
> > Thanks,
> > Girish 
> > 
> > 
> > > > Using:
> > > > container = bonobo.ui.Container()
> > > > control =
> bonobo.ui.Widget("http://www.gnome.org";,
> > > >container.corba_objref())
> > > > 
> > > > Bonobo-WARNING **: Activation exception
> 'Moniker
> > > > interface cannot be found'
> > > 
> > >   Bonobo is right ;) Try this instead:
> > > 
> > > control =
> > > bonobo.ui.Widget("vfs:http://www.gnome.org";,
> > >container.corba_objref())
> > > 
> > >   In a more general case, you have to be very
> > > careful with what you put
> > > after the moniker prefix (vfs:), since some
> > > characters have special
> > > meaning to bonobo.  When in doubt, escape the
> URI
> > > string first, using
> > > bonobo.moniker_util_escape().
> > 
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! Finance: Get your refund fast by filing
> online.
> > http://taxes.yahoo.com/filing.html
> > ___
> > pygtk mailing list   [EMAIL PROTECTED]
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ:
> http://www.async.com.br/faq/pygtk/
> -- 
> Gustavo J. A. M. Carneiro
> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> > #!/usr/bin/env python
> import pygtk; pygtk.require("2.0")
> import bonobo
> import bonobo.ui
> import gnome.vfs
> 
> obj = bonobo.get_object("vfs:http://www.gnome.org/";,
>   "IDL:Bonobo/Control:1.0")
> print obj
> 


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Bonobo and Python

2004-02-10 Thread Gustavo J. A. M. Carneiro
A Ter, 2004-02-10 às 07:31, Girish Wadhwani escreveu:
> That doesn't seem to work either.
> 
> What I am trying to do is to load a compotent to view
> a  file. From my understanding gnome will select the
> right component. What is the moniker that I have to
> use? Do I have to use gnome vfs? I haven't found much
> documentation on monikers except for:
>  http://primates.ximian.com/~miguel/monikers.html
> 

  Yes, bonobo automatically finds a component that can open the MIME
type of the URI.  However, that may not be very helpful in practice,
since it may find the worst of several components capable of displaying
that MIME type.
  Can you try the test program in attachment?  It should print an object
reference.  For me it prints:

[emperor:tmp]$ ./test-bonobo-monikers.py
Bonobo-Message: Stream extender: 'vfs:http://www.gnome.org/'
Bonobo-Message: Attempt activate object satisfying
'bonobo:supported_mime_types.has ('text/html') AND repo_ids.has
('IDL:Bonobo/Control:1.0') AND repo_ids.has
('IDL:Bonobo/PersistStream:1.0')': 0x81e41f0
 
(test-bonobo-monikers.py:2836): gtkhtml-WARNING **: No such file or
directory
 
(test-bonobo-monikers.py:2836): gtkhtml-WARNING **: No such file or
directory


> Thanks,
> Girish 
> 
> 
> > > Using:
> > > container = bonobo.ui.Container()
> > > control = bonobo.ui.Widget("http://www.gnome.org";,
> > >container.corba_objref())
> > > 
> > > Bonobo-WARNING **: Activation exception 'Moniker
> > > interface cannot be found'
> > 
> >   Bonobo is right ;) Try this instead:
> > 
> > control =
> > bonobo.ui.Widget("vfs:http://www.gnome.org";,
> >container.corba_objref())
> > 
> >   In a more general case, you have to be very
> > careful with what you put
> > after the moniker prefix (vfs:), since some
> > characters have special
> > meaning to bonobo.  When in doubt, escape the URI
> > string first, using
> > bonobo.moniker_util_escape().
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
> ___
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
#!/usr/bin/env python
import pygtk; pygtk.require("2.0")
import bonobo
import bonobo.ui
import gnome.vfs

obj = bonobo.get_object("vfs:http://www.gnome.org/";,
			"IDL:Bonobo/Control:1.0")
print obj
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Bonobo and Python

2004-02-10 Thread Girish Wadhwani
That doesn't seem to work either.

What I am trying to do is to load a compotent to view
a  file. From my understanding gnome will select the
right component. What is the moniker that I have to
use? Do I have to use gnome vfs? I haven't found much
documentation on monikers except for:
 http://primates.ximian.com/~miguel/monikers.html

Thanks,
Girish 


> > Using:
> > container = bonobo.ui.Container()
> > control = bonobo.ui.Widget("http://www.gnome.org";,
> >container.corba_objref())
> > 
> > Bonobo-WARNING **: Activation exception 'Moniker
> > interface cannot be found'
> 
>   Bonobo is right ;) Try this instead:
> 
> control =
> bonobo.ui.Widget("vfs:http://www.gnome.org";,
>container.corba_objref())
> 
>   In a more general case, you have to be very
> careful with what you put
> after the moniker prefix (vfs:), since some
> characters have special
> meaning to bonobo.  When in doubt, escape the URI
> string first, using
> bonobo.moniker_util_escape().


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Bonobo and Python

2004-02-09 Thread Gustavo J. A. M. Carneiro
A Seg, 2004-02-09 às 03:35, Girish Wadhwani escreveu:
> Hi,
> 
> I've been messing around with the Bonobo controls
> example in :
> http://www.pycage.de/howto_bonobo.html
> 
> As is, the script with:
> container = bonobo.ui.Container()
> control =
> bonobo.ui.Widget("OAFIID:Nautilus_Text_View",
>   container.corba_objref())
> 
> causes a new window to be opened but nothing is
> displaed i.e. the window is blank 
> _
> Using:
> container = bonobo.ui.Container()
> control = bonobo.ui.Widget("http://www.gnome.org";,
>container.corba_objref())
> 
> Bonobo-WARNING **: Activation exception 'Moniker
> interface cannot be found'

  Bonobo is right ;) Try this instead:

control = bonobo.ui.Widget("vfs:http://www.gnome.org";,
   container.corba_objref())

  In a more general case, you have to be very careful with what you put
after the moniker prefix (vfs:), since some characters have special
meaning to bonobo.  When in doubt, escape the URI string first, using
bonobo.moniker_util_escape().

> Traceback (most recent call last):
>   File "bonobotest.py", line 36, in ?
> container.corba_objref())
> RuntimeError: could not create BonoboControl object
> 
> ---
> Trying to view a pdf file with:
>uri = "file:" + sys.argv[1]
>control = bonobo.ui.widget(uri,
>container.corba_objref())
> 
> causes:
> 
>  Bonobo-WARNING **: Activation exception 'Moniker
> interface cannot be found'
> Traceback (most recent call last):
>   File "bonobotest.py", line 36, in ?
> container.corba_objref())
> RuntimeError: could not create BonoboControl object
> 
> Anybody have any success with this?
> 
> Thanks,
> Girish
> 
> Details of my installation:
>  
> I am using gentoo with 
> python 2.3.3
> gnome-python 2.0.0
> orbit-python 1.99.0-r1
> 
> The controls I have installed 
>  gwom $ activation-client -q --spec="has (repo_ids,
> 'IDL:Bonobo/Control:1.0')" | grep '^IID'
> IID OAFIID:Gst_Player_View, type factory, location
> OAFIID:Gst_Player_View_Factory
> IID OAFIID:GNOME_ShowDesktopApplet, type factory,
> location OAFIID:GNOME_Wncklet_Factory
> IID OAFIID:GNOME_WindowListApplet, type factory,
> location OAFIID:GNOME_Wncklet_Factory
> IID OAFIID:GNOME_TasklistApplet, type factory,
> location OAFIID:GNOME_Wncklet_Factory
> IID OAFIID:GNOME_WorkspaceSwitcherApplet, type
> factory, location OAFIID:GNOME_Wncklet_Factory
> IID OAFIID:GNOME_PagerApplet, type factory, location
> OAFIID:GNOME_Wncklet_Factory
> IID OAFIID:GNOME_WindowMenuApplet, type factory,
> location OAFIID:GNOME_Wncklet_Factory
> IID OAFIID:GNOME_SystemTrayApplet, type factory,
> location OAFIID:GNOME_NotificationAreaApplet_Factory
> IID OAFIID:GNOME_GDictApplet, type factory, location
> OAFIID:GNOME_GDictApplet_Factory
> IID OAFIID:GNOME_EOG_Control, type factory, location
> OAFIID:GNOME_EOG_Factory
> IID OAFIID:GNOME_EOG_CollectionControl, type factory,
> location OAFIID:GNOME_EOG_CollectionFactory
> IID OAFIID:GNOME_DriveMountApplet, type factory,
> location OAFIID:GNOME_DriveMountApplet_Factory
> IID OAFIID:GNOME_Gedit_Control, type factory, location
> OAFIID:GNOME_Gedit_ViewerFactory
> IID OAFIID:Themus_Theme_Properties_View, type shlib,
> location
> /usr/lib/bonobo/libthemus-theme-properties-view.so
> IID OAFIID:GNOME_PDF_NautilusPropertyPage, type
> factory, location OAFIID:GNOME_PDF_Factory
> IID OAFIID:GNOME_PDF_Control, type factory, location
> OAFIID:GNOME_PDF_Factory
> IID OAFIID:Nautilus_Audio_Properties_View, type shlib,
> location
> /usr/lib/bonobo/libnautilus-audio-properties-view.so
> IID OAFIID:Nautilus_Audio_View, type factory, location
> OAFIID:Nautilus_Audio_View_Factory
> IID OAFIID:GNOME_NotificationAreaApplet, type factory,
> location OAFIID:GNOME_NotificationAreaApplet_Factory
> IID OAFIID:GNOME_FishApplet, type factory, location
> OAFIID:GNOME_FishApplet_Factory
> IID OAFIID:Nautilus_File_Manager_Search_List_View,
> type factory, location OAFIID:Nautilus_Factory
> IID OAFIID:Nautilus_File_Manager_List_View, type
> factory, location OAFIID:Nautilus_Factory
> IID OAFIID:Nautilus_File_Manager_Desktop_Icon_View,
> type factory, location OAFIID:Nautilus_Factory
> IID OAFIID:Nautilus_File_Manager_Icon_View, type
> factory, location OAFIID:Nautilus_Factory
> IID OAFIID:Square_Controller, type factory, location
> OAFIID:Square_ControllerFactory
> IID OAFIID:Circle_Controller, type factory, location
> OAFIID:Circle_ControllerFactory
> IID OAFIID:Bonobo_Sample_Entry, type factory, location
> OAFIID:Bonobo_Sample_ControlFactory
> IID OAFIID:Nautilus_History_View, type shlib, location
> /usr/lib/bonobo/libnautilus-history-view
> IID OAFIID:Nautilus_Notes_View, type shlib, location
> /usr/lib/bonobo/libnautilus-notes-view
> IID OAFIID:Nautilus_Printers_View, type shlib,
> location /usr/lib/bonobo/libnautilus-printers-view.so
> IID OAFIID:GNOME_ClockApplet, type factory, location
> OAFIID:GNOME_ClockApplet_Factory
> IID OAFIID:GNOME_Epiphany_Na

[pygtk] Bonobo and Python

2004-02-08 Thread Girish Wadhwani
Hi,

I've been messing around with the Bonobo controls
example in :
http://www.pycage.de/howto_bonobo.html

As is, the script with:
container = bonobo.ui.Container()
control =
bonobo.ui.Widget("OAFIID:Nautilus_Text_View",
  container.corba_objref())

causes a new window to be opened but nothing is
displaed i.e. the window is blank 
_
Using:
container = bonobo.ui.Container()
control = bonobo.ui.Widget("http://www.gnome.org";,
   container.corba_objref())

Bonobo-WARNING **: Activation exception 'Moniker
interface cannot be found'
Traceback (most recent call last):
  File "bonobotest.py", line 36, in ?
container.corba_objref())
RuntimeError: could not create BonoboControl object

---
Trying to view a pdf file with:
   uri = "file:" + sys.argv[1]
   control = bonobo.ui.widget(uri,
   container.corba_objref())

causes:

 Bonobo-WARNING **: Activation exception 'Moniker
interface cannot be found'
Traceback (most recent call last):
  File "bonobotest.py", line 36, in ?
container.corba_objref())
RuntimeError: could not create BonoboControl object

Anybody have any success with this?

Thanks,
Girish

Details of my installation:
 
I am using gentoo with 
python 2.3.3
gnome-python 2.0.0
orbit-python 1.99.0-r1

The controls I have installed 
 gwom $ activation-client -q --spec="has (repo_ids,
'IDL:Bonobo/Control:1.0')" | grep '^IID'
IID OAFIID:Gst_Player_View, type factory, location
OAFIID:Gst_Player_View_Factory
IID OAFIID:GNOME_ShowDesktopApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_WindowListApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_TasklistApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_WorkspaceSwitcherApplet, type
factory, location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_PagerApplet, type factory, location
OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_WindowMenuApplet, type factory,
location OAFIID:GNOME_Wncklet_Factory
IID OAFIID:GNOME_SystemTrayApplet, type factory,
location OAFIID:GNOME_NotificationAreaApplet_Factory
IID OAFIID:GNOME_GDictApplet, type factory, location
OAFIID:GNOME_GDictApplet_Factory
IID OAFIID:GNOME_EOG_Control, type factory, location
OAFIID:GNOME_EOG_Factory
IID OAFIID:GNOME_EOG_CollectionControl, type factory,
location OAFIID:GNOME_EOG_CollectionFactory
IID OAFIID:GNOME_DriveMountApplet, type factory,
location OAFIID:GNOME_DriveMountApplet_Factory
IID OAFIID:GNOME_Gedit_Control, type factory, location
OAFIID:GNOME_Gedit_ViewerFactory
IID OAFIID:Themus_Theme_Properties_View, type shlib,
location
/usr/lib/bonobo/libthemus-theme-properties-view.so
IID OAFIID:GNOME_PDF_NautilusPropertyPage, type
factory, location OAFIID:GNOME_PDF_Factory
IID OAFIID:GNOME_PDF_Control, type factory, location
OAFIID:GNOME_PDF_Factory
IID OAFIID:Nautilus_Audio_Properties_View, type shlib,
location
/usr/lib/bonobo/libnautilus-audio-properties-view.so
IID OAFIID:Nautilus_Audio_View, type factory, location
OAFIID:Nautilus_Audio_View_Factory
IID OAFIID:GNOME_NotificationAreaApplet, type factory,
location OAFIID:GNOME_NotificationAreaApplet_Factory
IID OAFIID:GNOME_FishApplet, type factory, location
OAFIID:GNOME_FishApplet_Factory
IID OAFIID:Nautilus_File_Manager_Search_List_View,
type factory, location OAFIID:Nautilus_Factory
IID OAFIID:Nautilus_File_Manager_List_View, type
factory, location OAFIID:Nautilus_Factory
IID OAFIID:Nautilus_File_Manager_Desktop_Icon_View,
type factory, location OAFIID:Nautilus_Factory
IID OAFIID:Nautilus_File_Manager_Icon_View, type
factory, location OAFIID:Nautilus_Factory
IID OAFIID:Square_Controller, type factory, location
OAFIID:Square_ControllerFactory
IID OAFIID:Circle_Controller, type factory, location
OAFIID:Circle_ControllerFactory
IID OAFIID:Bonobo_Sample_Entry, type factory, location
OAFIID:Bonobo_Sample_ControlFactory
IID OAFIID:Nautilus_History_View, type shlib, location
/usr/lib/bonobo/libnautilus-history-view
IID OAFIID:Nautilus_Notes_View, type shlib, location
/usr/lib/bonobo/libnautilus-notes-view
IID OAFIID:Nautilus_Printers_View, type shlib,
location /usr/lib/bonobo/libnautilus-printers-view.so
IID OAFIID:GNOME_ClockApplet, type factory, location
OAFIID:GNOME_ClockApplet_Factory
IID OAFIID:GNOME_Epiphany_NautilusView, type factory,
location OAFIID:GNOME_Epiphany_NautilusViewFactory
IID OAFIID:Nautilus_Image_Properties_View, type shlib,
location
/usr/lib/bonobo/libnautilus-image-properties-view
IID OAFIID:Nautilus_Emblem_View, type shlib, location
/usr/lib/bonobo/libnautilus-emblem-view
IID OAFIID:Nautilus_Tree_View, type shlib, location
/usr/lib/bonobo/libnautilus-tree-view
IID OAFIID:Nautilus_Throbber, type factory, location
OAFIID:Nautilus_Throbber_Factory
IID OAFIID:Nautilus_Text_View, type factory, location
OAFIID:Nautilus_Text_View_Factory
IID OAFIID:GNOME_CharpickerApplet, type factory,
location OAFIID:GNOME_CharpickerApplet_Factory
IID OAFIID:GNOME_MixerApplet, typ

[pygtk] bonobo GtkHTML control

2004-01-18 Thread Bryan Clark
Hi ~

I'm using a bonobo.ui widget in my application and I'm getting the
following errors.   The first lines of errors are just from the
application startup, the second line of errors spew out whenever you
type into the GtkHTML window.  I'm wondering if this is a bug or just
something I'm doing wrong or maybe its normal.

** (mainWindow.py:21170): WARNING **: `GtkTextSearchFlags' is not an
enum type
*** attempt to put segment in horiz list twice
*** attempt to put segment in horiz list twice
 
--- And Then ---

(blogsxom:21170): GLib-GObject-CRITICAL **: file genums.c: line 358
(g_enum_get_value): assertion `G_IS_ENUM_CLASS (enum_class)' failed
 
(blogsxom:21170): gtkhtml-WARNING **: Invalid GTK_TYPE_HTML_COMMAND enum
value 7


Here's the relevant code from my app.


gnome.init('py-gtkhtml','0.0.1')
bonobo.activate ()

self.window =  bonobo.ui.Window ('py-gtkhtml', '0.0.1')

self.window.connect("delete_event", self.delete_event)
 
self.window.connect("destroy", self.destroy)

uic = self.window.get_ui_container ()

control=bonobo.ui.Widget ("OAFIID:GNOME_GtkHTML_Editor:3.1",
  uic.corba_objref())
control.show ()

self.box = gtk.VBox(gtk.FALSE,0)

self.title_entry = gtk.Entry()
self.title_box = gtk.HBox(gtk.FALSE,2)
self.title_box.pack_start(gtk.Label("Title:"),gtk.FALSE,gtk.
FALSE,0)
self.title_box.pack_start(self.title_entry,gtk.TRUE,gtk.TRUE,0)

self.post_button = gtk.Button("_Post Entry")
self.action_box = gtk.HBox(gtk.FALSE,2)  
self.action_box.pack_end(self.post_button,gtk.FALSE,gtk.FALSE,2)

self.box.pack_start(self.title_box,gtk.FALSE,gtk.FALSE,2)
self.box.pack_start(control,gtk.TRUE, gtk.TRUE,2)
self.box.pack_end(self.action_box,gtk.FALSE,gtk.FALSE,2)

self.window.set_contents (self.box)

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Bonobo::ItemHandler, segfault

2002-12-08 Thread Gustavo J A M Carneiro
  I'm trying to implement the Bonobo::ItemHandler interface in a python
control. I use this code to implement that interface:

def __item_handler_enumObjects(self):
return []

def __item_handler_getObject(self, item_handler, item_name,
 only_if_exists, environ):
print "item name: ", item_name
print "only if exists: ", only_if_exists
print "environ: ", environ

return item_handler.corba_objref()


def _add_item_handler(self):
handler = bonobo.ItemHandler(self.__item_handler_enumObjects,
 self.__item_handler_getObject)
self.add_interface(handler)

  I invoke the interface from a C-based container app with:
ctrl = bonobo_get_object("OAFIID:Numexp_XYGraph!uri=file:///tmp/foo.xyg",
 "IDL:Bonobo/Control:1.0", &ev);

  However, the python server segfaults:
(...)
item name:  uri=file:///tmp/foo.xyg
only if exists:  1
environ:  
Segmentation fault (core dumped)

  I wouldn't be surprised if it were my fault. I'm just trying to learn
about monikers, etc.

  The backtrace from gdb is:

#0  0x40273e4a in ORBit_POA_deactivate_object (poa=0x81b2990, pobj=0x8320218,
do_etherealize=170 'ª', is_cleanup=0 '\0') at poa.c:830
#1  0x40274cff in ORBit_POAObject_post_invoke (pobj=0x832019c) at poa.c:1323
#2  0x402743cd in ORBit_POAObject_handle_request (pobj=0x8320218,
opname=0x83203dc "unref", ret=0x, args=0x, ctx=0x,
recv_buffer=0x8320330, ev=0xbfffed24) at poa.c:1130
#3  0x40274945 in ORBit_POA_handle_request (poa=0x81b2990,
recv_buffer=0x8320330, objkey=0x) at poa.c:1186
#4  0x4027818c in ORBit_handle_request (orb=0x, recv_buffer=0x8320330)
at orbit-adaptor.c:94
#5  0x4025f796 in giop_connection_handle_input (lcnx=0x8320348)
at giop-recv-buffer.c:1202
#6  0x4001896d in linc_connection_io_handler (gioc=0x0, condition=G_IO_IN,
data=0x82eafc8) at linc-connection.c:862
#7  0x4001a9b0 in linc_source_dispatch (source=0x83202e0,
callback=0x40018770 , user_data=0x)
at linc-source.c:54
#8  0x401ee495 in g_main_dispatch (context=0x81b6a28) at gmain.c:1653
#9  0x401ef368 in g_main_context_dispatch (context=0x81b6a28) at gmain.c:2197
#10 0x401ef67d in g_main_context_iterate (context=0x81b6a28, block=1,
dispatch=1, self=0x811fa30) at gmain.c:2278
#11 0x401efdbf in g_main_loop_run (loop=0x829b8a8) at gmain.c:2498
#12 0x4031d7f8 in bonobo_main () at bonobo-main.c:293
---Type  to continue, or q  to quit---
#13 0x402cf969 in _wrap_bonobo_main (self=0x0) at bonobo.c:1257
#14 0x0807739e in fast_cfunction (func=0x81b79f0, pp_stack=0xb054, na=0)
at Python/ceval.c:3112
#15 0x08075b36 in eval_frame (f=0x8110f2c) at Python/ceval.c:1996
#16 0x08076b22 in PyEval_EvalCodeEx (co=0x8144320, globals=0x8109fec,
locals=0x8109fec, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2574
#17 0x08078b19 in PyEval_EvalCode (co=0x8144320, globals=0x8109fec,
locals=0x8109fec) at Python/ceval.c:483
#18 0x08092a63 in run_node (n=0x8119b30,
filename=0xb479 "./numexp-xygraph", globals=0x8109fec,
locals=0x8109fec, flags=0xb258) at Python/pythonrun.c:1083
#19 0x08092a1e in run_err_node (n=0x8119b30,
filename=0xb479 "./numexp-xygraph", globals=0x8109fec,
locals=0x8109fec, flags=0xb258) at Python/pythonrun.c:1070
#20 0x080926aa in PyRun_FileExFlags (fp=0x80fa888,
filename=0xb479 "./numexp-xygraph", start=257, globals=0x8109fec,
locals=0x8109fec, closeit=1, flags=0xb258) at Python/pythonrun.c:1061
#21 0x08091371 in PyRun_SimpleFileExFlags (fp=0x80fa888,
filename=0xb479 "./numexp-xygraph", closeit=1, flags=0xb258)
at Python/pythonrun.c:689
#22 0x0809226c in PyRun_AnyFileExFlags (fp=0x80fa888,
filename=0xb479 "./numexp-xygraph", closeit=1, flags=0xb258)
---Type  to continue, or q  to quit---
at Python/pythonrun.c:499
#23 0x080533a4 in Py_Main (argc=2, argv=0xb2e4) at Modules/main.c:369
#24 0x08052c84 in main (argc=2, argv=0xb2e4) at Modules/python.c:10
#25 0x4007817d in __libc_start_main (main=0x8052c70 , argc=2,
ubp_av=0xb2e4, init=0x8052098 <_init>, fini=0x80c7be0 <_fini>,
rtld_fini=0x4000a534 <_dl_fini>, stack_end=0xb2dc)
at ../sysdeps/generic/libc-start.c:129



-- 
Gustavo João Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] Bonobo::ItemHandler, segfault

2002-12-08 Thread Gustavo J A M Carneiro
  I'm trying to implement the Bonobo::ItemHandler interface in a python
control. I use this code to implement that interface:

def __item_handler_enumObjects(self):
return []

def __item_handler_getObject(self, item_handler, item_name,
 only_if_exists, environ):
print "item name: ", item_name
print "only if exists: ", only_if_exists
print "environ: ", environ

return item_handler.corba_objref()


def _add_item_handler(self):
handler = bonobo.ItemHandler(self.__item_handler_enumObjects,
 self.__item_handler_getObject)
self.add_interface(handler)

  I invoke the interface from a C-based container app with:
ctrl = bonobo_get_object("OAFIID:Numexp_XYGraph!uri=file:///tmp/foo.xyg",
 "IDL:Bonobo/Control:1.0", &ev);

  However, the python server segfaults:
(...)
item name:  uri=file:///tmp/foo.xyg
only if exists:  1
environ:  
Segmentation fault (core dumped)

  I wouldn't be surprised if it were my fault. I'm just trying to learn
about monikers, etc.

  The backtrace from gdb is:

#0  0x40273e4a in ORBit_POA_deactivate_object (poa=0x81b2990, pobj=0x8320218,
do_etherealize=170 'ª', is_cleanup=0 '\0') at poa.c:830
#1  0x40274cff in ORBit_POAObject_post_invoke (pobj=0x832019c) at poa.c:1323
#2  0x402743cd in ORBit_POAObject_handle_request (pobj=0x8320218,
opname=0x83203dc "unref", ret=0x, args=0x, ctx=0x,
recv_buffer=0x8320330, ev=0xbfffed24) at poa.c:1130
#3  0x40274945 in ORBit_POA_handle_request (poa=0x81b2990,
recv_buffer=0x8320330, objkey=0x) at poa.c:1186
#4  0x4027818c in ORBit_handle_request (orb=0x, recv_buffer=0x8320330)
at orbit-adaptor.c:94
#5  0x4025f796 in giop_connection_handle_input (lcnx=0x8320348)
at giop-recv-buffer.c:1202
#6  0x4001896d in linc_connection_io_handler (gioc=0x0, condition=G_IO_IN,
data=0x82eafc8) at linc-connection.c:862
#7  0x4001a9b0 in linc_source_dispatch (source=0x83202e0,
callback=0x40018770 , user_data=0x)
at linc-source.c:54
#8  0x401ee495 in g_main_dispatch (context=0x81b6a28) at gmain.c:1653
#9  0x401ef368 in g_main_context_dispatch (context=0x81b6a28) at gmain.c:2197
#10 0x401ef67d in g_main_context_iterate (context=0x81b6a28, block=1,
dispatch=1, self=0x811fa30) at gmain.c:2278
#11 0x401efdbf in g_main_loop_run (loop=0x829b8a8) at gmain.c:2498
#12 0x4031d7f8 in bonobo_main () at bonobo-main.c:293
---Type  to continue, or q  to quit---
#13 0x402cf969 in _wrap_bonobo_main (self=0x0) at bonobo.c:1257
#14 0x0807739e in fast_cfunction (func=0x81b79f0, pp_stack=0xb054, na=0)
at Python/ceval.c:3112
#15 0x08075b36 in eval_frame (f=0x8110f2c) at Python/ceval.c:1996
#16 0x08076b22 in PyEval_EvalCodeEx (co=0x8144320, globals=0x8109fec,
locals=0x8109fec, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2574
#17 0x08078b19 in PyEval_EvalCode (co=0x8144320, globals=0x8109fec,
locals=0x8109fec) at Python/ceval.c:483
#18 0x08092a63 in run_node (n=0x8119b30,
filename=0xb479 "./numexp-xygraph", globals=0x8109fec,
locals=0x8109fec, flags=0xb258) at Python/pythonrun.c:1083
#19 0x08092a1e in run_err_node (n=0x8119b30,
filename=0xb479 "./numexp-xygraph", globals=0x8109fec,
locals=0x8109fec, flags=0xb258) at Python/pythonrun.c:1070
#20 0x080926aa in PyRun_FileExFlags (fp=0x80fa888,
filename=0xb479 "./numexp-xygraph", start=257, globals=0x8109fec,
locals=0x8109fec, closeit=1, flags=0xb258) at Python/pythonrun.c:1061
#21 0x08091371 in PyRun_SimpleFileExFlags (fp=0x80fa888,
filename=0xb479 "./numexp-xygraph", closeit=1, flags=0xb258)
at Python/pythonrun.c:689
#22 0x0809226c in PyRun_AnyFileExFlags (fp=0x80fa888,
filename=0xb479 "./numexp-xygraph", closeit=1, flags=0xb258)
---Type  to continue, or q  to quit---
at Python/pythonrun.c:499
#23 0x080533a4 in Py_Main (argc=2, argv=0xb2e4) at Modules/main.c:369
#24 0x08052c84 in main (argc=2, argv=0xb2e4) at Modules/python.c:10
#25 0x4007817d in __libc_start_main (main=0x8052c70 , argc=2,
ubp_av=0xb2e4, init=0x8052098 <_init>, fini=0x80c7be0 <_fini>,
rtld_fini=0x4000a534 <_dl_fini>, stack_end=0xb2dc)
at ../sysdeps/generic/libc-start.c:129



-- 
Gustavo João Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] Bonobo reference problem

2002-11-05 Thread Arjan J. Molenaar
On Tue, 2002-11-05 at 15:11, James Henstridge wrote:
> Arjan J. Molenaar wrote:
> >
> Thank you for the bug report.  I have updated pyorbit to fix the 
> problem.  The pycorba_object_new() function used to create a wrapper for 
> a CORBA object didn't duplicate the object reference (which all of the 
> other APIs in pyorbit do).  The bonobo bindings were assuming the 
> function did duplicate the objref, which caused the problems.
> 
> I have updated pyorbit so that the API is consistent with the rest of 
> the pyorbit API, which stops your example from crashing.

Great! Now Gaphor work (almost) out of the box ;-). May I remind you
that there is still a patch pending that fixes a referencing bug in
Gnome.ui.About dialog. It's in bugzilla... Can't contact
bugzilla.gnome.org for some reason, so I can't provide you the bug id
:-(

Thanks,

Arjan


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] Bonobo reference problem

2002-11-05 Thread James Henstridge
Arjan J. Molenaar wrote:


Hi,

I'm experiencing problems when I try to close a window by pressing the
upper-right close button on the window title bar.

This small app exposes the bug:

import pygtk
pygtk.require('2.0')
import gtk, bonobo, bonobo.ui

def init():
   window = bonobo.ui.Window ('Title', 'test')
   window.set_size_request(100, 100)
   window.show_all ()
   ui_container = window.get_ui_container ()
   engine = window.get_ui_engine ()
   engine.config_set_path ('/hello-app/UIConfig/kvps')
   ui_component = bonobo.ui.Component ('test')
   ui_component.set_container (ui_container.corba_objref ())

init()
bonobo.main()


It's basically the same problem I had with orbit-python, but I can't
figure out what the *real* problem is...

Any help would be appreciated.
 

Thank you for the bug report.  I have updated pyorbit to fix the 
problem.  The pycorba_object_new() function used to create a wrapper for 
a CORBA object didn't duplicate the object reference (which all of the 
other APIs in pyorbit do).  The bonobo bindings were assuming the 
function did duplicate the objref, which caused the problems.

I have updated pyorbit so that the API is consistent with the rest of 
the pyorbit API, which stops your example from crashing.

James.

--
Email: [EMAIL PROTECTED]  | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 




___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


RE: [pygtk] Bonobo reference problem

2002-11-04 Thread arjanmolenaar
> On Sun, Nov 03, 2002 at 09:23:19PM +0100, Arjan J. Molenaar wrote:
> > I'm experiencing problems when I try to close a window by pressing the
> > upper-right close button on the window title bar.
> > 
> > This small app exposes the bug:
> > 
> > import pygtk
> > pygtk.require('2.0')
> > import gtk, bonobo, bonobo.ui
> > 
> > def init():
> > window = bonobo.ui.Window ('Title', 'test')
> > window.set_size_request(100, 100)
> > window.show_all ()
> > ui_container = window.get_ui_container ()
> > engine = window.get_ui_engine ()
> > engine.config_set_path ('/hello-app/UIConfig/kvps')
> > ui_component = bonobo.ui.Component ('test')
> > ui_component.set_container (ui_container.corba_objref ())
> > 
> > init()
> > bonobo.main()
> > 
> > It's basically the same problem I had with orbit-python, but I can't
> > figure out what the *real* problem is...

> Okay, but *what* is the apparent problem, Arjan? Don't make us guess :-)

Oh, I'm sorry... If you run this script mentioned above and close it using the
close button on the window's title bar, the application crashes with the
following message:

** ERROR **: file orbit-object.c: line 146 (do_unref): assertion failed:
 (robj->refs < ORBIT_REFCOUNT_MAX && robj->refs > 0)
aborting...

The problem is probably in the fact that in pyorbit/src/pycorba-object.c a weak
reference is obtained to the CORBA object (no reference count incremented),
but it is unreferences in the dealloc() function...

Regards,

Arjan


Internet wordt pas leuk als je mee kunt doen. Ga naar http://www.hetnet.nl
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] Bonobo reference problem

2002-11-03 Thread Christian Reis
On Sun, Nov 03, 2002 at 09:23:19PM +0100, Arjan J. Molenaar wrote:
> I'm experiencing problems when I try to close a window by pressing the
> upper-right close button on the window title bar.
> 
> This small app exposes the bug:
> 
> import pygtk
> pygtk.require('2.0')
> import gtk, bonobo, bonobo.ui
> 
> def init():
> window = bonobo.ui.Window ('Title', 'test')
> window.set_size_request(100, 100)
> window.show_all ()
> ui_container = window.get_ui_container ()
> engine = window.get_ui_engine ()
> engine.config_set_path ('/hello-app/UIConfig/kvps')
> ui_component = bonobo.ui.Component ('test')
> ui_component.set_container (ui_container.corba_objref ())
> 
> init()
> bonobo.main()
> 
> It's basically the same problem I had with orbit-python, but I can't
> figure out what the *real* problem is...

Okay, but *what* is the apparent problem, Arjan? Don't make us guess :-)

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] Bonobo reference problem

2002-11-03 Thread Arjan J. Molenaar
Hi,

I'm experiencing problems when I try to close a window by pressing the
upper-right close button on the window title bar.

This small app exposes the bug:

import pygtk
pygtk.require('2.0')
import gtk, bonobo, bonobo.ui

def init():
window = bonobo.ui.Window ('Title', 'test')
window.set_size_request(100, 100)
window.show_all ()
ui_container = window.get_ui_container ()
engine = window.get_ui_engine ()
engine.config_set_path ('/hello-app/UIConfig/kvps')
ui_component = bonobo.ui.Component ('test')
ui_component.set_container (ui_container.corba_objref ())

init()
bonobo.main()


It's basically the same problem I had with orbit-python, but I can't
figure out what the *real* problem is...

Any help would be appreciated.

Regards,

Arjan

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



Re: [pygtk] bonobo

2000-04-07 Thread James Henstridge

not yet (I will probably add support when I get a bit further along with
the rewrite).

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Fri, 7 Apr 2000, wrobell wrote:

> Any python module for gnome bonobo?
> 
>   wrobell <[EMAIL PROTECTED]>
> -
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



[pygtk] bonobo

2000-04-07 Thread wrobell

Any python module for gnome bonobo?

wrobell <[EMAIL PROTECTED]>
-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]