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
<CORBA.Object 'IDL:Bonobo/Control:1.0' at 0x81e41f0>

> 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/

Reply via email to