ADC Home > Reference Library > Technical Q&As > Carbon > Process Management >
|
Q: My application wants to launch the user's default browser to display help content. In Mac OS 9 I do this by constructing a "file:///" URL and passing it to ICLaunchURL. However, on Mac OS X ICLaunchURL returns an error. What's the problem? A: The error is probably the result of a change in the "file:///" URL format. Given that you're porting code from Mac OS 9 to Mac OS X, you're probably generating your "file:///" URL in the format used in Mac OS 9, that is, the volume name followed by path components, each separated by a "/". For example, if you have two volumes each with a "index.html" file in the root, the URLs might be:
These "file:///" URLs will not work on Mac OS X, which uses the standard UNIX-style "file:///" URL format. To continue the above example, the Mac OS X URLs would be:
The obvious difference between these URLs is that Mac OS X mounts the startup disk in the root of the directory hierarchy and all non-startup disks in the "Volumes" directory. However, there are some more subtle differences.
One possible workaround is to change your code to generate the "file:///" URL in the right format. You can do this with a sequence of File Manager, CFURL, and CFString calls. An easier workaround is to avoid
[Apr 20 2001] |
|