Re: Sample bonobo2 container.



On Qua, 2003-03-26 at 00:37, Sergey V. Oudaltsov wrote:
> Hi Michael
> 
> Thank you for the feedback. I will have a look and put some order into
> my hacks. Just a couple of easy questions:
> 
> > 	a) hard-coded application specific things are un-maintainable /
> > non-scalable. We should do a bonobo_activation query. Better still we
> > should just use a moniker - which will do all the mime type / component
> > selection stuff for us. That should axe a chunk of code.
> I will try to find it. But if you could give me a line of code - I would
> be grateful. How would you obtain the name of the interface having the
> file name. AFAIU, the chain should be "file extention" -> "mime type" ->
> "interace". So how would you do this?

  Using the file: moniker:
    control = bonobo_get_object("file:/foo/bar.jpg", "Bonobo/Control",
&ev);
  
  Using the vfs: moniker:
    control = bonobo_get_object("vfs:ssh://user host:foo/bar.jpg",
"Bonobo/Control", &ev);


  I know it sounds too simple. "I couldn't work!", you probably think. 
Yet, it does work! ;-)

-- 
Gustavo Joćo Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]