Re: Check if URL Handler is available for URL
Re: Check if URL Handler is available for URL
- Subject: Re: Check if URL Handler is available for URL
- From: Jay Prince <email@hidden>
- Date: Wed, 18 Sep 2002 10:34:36 -0700
Along the same lines, what's the correct way to register to BE a URL
handler / helper App?
My application has url types set, and I have even gone into IE to try
and manually force it to launch my app, but it launches another app
instead.
(Maybe an example of setting a URL Type correctly would help, if that's
all you're supposed to do.)
And where will my application receive the URL, btw? In a document
handleBlahForType?
Muchas Gracias.
PS- I did look in the archives, all 13 pages of results, but didn't
find an explanation-- seems most people want to access URLs, rather
than be a handler that is launched when someone clicks on one.
On Wednesday, September 18, 2002, at 07:46 am, Manfred Lippert wrote:
Hi,
I need a routine that checks for any string if it is
- a valid URL
and
- if there is a service (handler) registered in the system for this URL
I should _not_ check if the resource to which the URL references does
exist. All should work local and fast.
How can I do that?
The routine should e.g. return TRUE for the following strings:
"http://blah.com"
"webcal://jdfhgkjg"
"mailto:email@hidden"
and any other available services that may be available in the future.
But it should return FALSE for the following strings:
"doesnotexist://domain.com"
"invalidurl"
(If there is no handler for "doesnotexist:" registered in the system
;-))
I tried the following, but it does not work:
NSString myString = ...
BOOL isURLAndServiceIsAvailable =
([NSURLHandle URLHandleClassForURL:[NSURL URLWithString:myString]] !=
nil);
It would have been very cool if that had worked, but it doesn't. :-(
For simple URLs like "http://domain.com" is works, but e.g. not for
"webcal://domain.com" or "mailto:email@hidden" etc.
Do I have to use InternetConfig?
BTW: webcal-URLs do work on my computer, but there no "webcal" service
listed in the "More Internet" Preference Panel - why?
(More Internet is available at http://www.monkeyfood.com/software/)
Thank you for any help,
Mani
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.