discuss-gnustep
[Top][All Lists]
Advanced

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

Re: RSS/RDF Aggregator


From: nicolas
Subject: Re: RSS/RDF Aggregator
Date: Tue, 21 Oct 2003 14:28:04 +0200
User-agent: Internet Messaging Program (IMP) 3.2.1

Selon "Chris B. Vetter" <address@hidden>:

> > simplistic NSWebBrowser default approach. Nowadays the correct thing
> > to do would be to resemble an approach that OS X or KDE (probably
> > GNOME, too) implement, which is to refer to something like the
> > InternetConfig (buried in OS X's CoreServices) and let this handle the
> > appropriate scheme (if it can handle it). After all, these schemes can
> > be a variety of protocols, most likeley HTTP but also FTP and NEWS.
> > 'NSWebBrowser' is probably too simplistic. Whether this configuration
> > is in the scope of Preferences.app or GWorkspace.app I'm not sure (I
> > tend to think the latter).
(...)
> 
> I admit, I do not know how OSX does it (since I don't have a Mac), but
> the following might be an idea:
> 
>   if the argument is a file
>   {
>     call -openFile:
>   }
>   else // this is a replacement for current the 'return NO'
>   {
>     look for NSWebBrowser
> 
>     ask NSPasteboard for NSURLServicePasteboard
>     add the argument to it
> 
>     if NSWebBrowser is not set
>     {
>       look for NSURLService
> 
>       if NSURLService doesn't exist
>       {
>         assume "Open URL"
>       }
> 
>       NSPerformService(NSURLService, NSURLServicePasteboard)
>      }
>      else // NSWebBrowser is set
>      {
>        add the argument
>        fire up NSWebBrowser
>      }
>   }
> 
> I played with an implementation of it. If there's an application
> implementing NSURLService (or "Open URL") the respective application is
> started, otherwise it will launch the specified browser (if there is
> one). The worst that will happen is a message like "gnustep doesn't know
> what to do with your request". Oh well...
> 
> But since WebCore is almost completely ported, there's hope ;-)

Well, it will work well for http, but what about others common urls ?
(ie, mailto://, news://, ftp:// ...)
I think it could be better to have for each protocol the corresponding
prefered application; an "analyzeURL" method could exist which will then
dispatch to the correct app.

-- 
Nico





reply via email to

[Prev in Thread] Current Thread [Next in Thread]