[interfacekit] Re: BRoster::FindApp()

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: interfacekit@xxxxxxxxxxxxx
  • Date: Sun, 18 Jan 2004 01:11:51 +0100 CET

Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote:
> On Thu, 15 Jan 2004, Axel Dörfler wrote:
> > I just noticed that the BeOS implemenation of BRoster::FindApp() 
> > and
> > BRoster::Launch() just fail if the preferred application of a given
> > MIME type is not existing anymore (I replaced the original 
> > ShowImage
> > with our version).
> Our implementation resembles the R5 one *very* closely, so the 
> behavior
> should be the same in this case.

Okay.

> > Wouldn't it be more sensible to search a new default application
> > instead of just failing? The system provides enough information for
> > this, anyway; i.e. it could simply remove the preferred app 
> > signature
> > and try again (so that the one from the super type can come into 
> > play).
> > If that also fails, it should have a decent explanation on how to 
> > fix
> > it in the error message.
> I'm not sure, if that would be a good idea. The preferred application
> property is set by the user -- via FileType (for the file), FileTypes 
> (for
> a MIME type), or at least indirectly by telling an application to 
> register
> as preferred application for a certain MIME type (well, some apps 
> register
> themselves without user interaction) -- so just changing it 
> automatically
> may not be desirable.

Okay, it could also just ignore it then, but doesn't change the 
preferred application. In any way, it only does something when the 
preferred application is not available anymore - only if the MIME type 
meta information was not correct.

> Maybe it would be better if FindApp() would return a more precise 
> error
> code, i.e. something like B_PREFERRED_APP_NOT_FOUND. Then the caller 
> can
> ask the user what to do now (e.g. unsetting the preferred app and/or
> search for another app).

That would be a solution, too, although I would like a little more 
intelligent approach as above even more :)

> PS: Shouldn't our ShowImage have the same signature as the original 
> one?

That would make bad applications happy, as well as my MIME database :)
I think it's okay for testing purposes to have any signature, but I am 
not really sure about the final thing for applications like this.

Bye,
   Axel.


Other related posts: