Re: how to call default browser/mail program
Re: how to call default browser/mail program
- Subject: Re: how to call default browser/mail program
- From: j o a r <email@hidden>
- Date: Mon, 29 Sep 2003 11:29:20 +0200
When reading my answers, remember that this is Cocoa-Dev, and some
things are outside the scope of Cocoa - ie. you have to dip down to
underlying frameworks (and hence corresponding mailing lists) to solve
these problems.
On 2003-09-29, at 10.53, Emmanuel Verlynde wrote:
1 - How to call default browser and mail program?
i use [[NSWorkspace sharedWorkspace] openURL: [NSURL
URLWithString:@"http://..."]];
but it seem that it's does'nt work on all systems.
This should always work, if not it's a bug in NSWorkspace. Can you give
a concrete example?
2 - How to know disk device type where application is launched?? (Hard
Disk or CD Rom Device, ...)
and can i know if a cd device have audio track on it?
This can't be done very efficiently using Cocoa, but NSWorkspace has
some methods that you can use (for example "mountedRemovableMedia").
Look for more answers in the list archives:
<
http://cocoa.mamasam.com/>
3 - How to get programmaticaly the system language used?
Why do you need it?
4 - Can i use the user prefs ([NSUserDefaults standardUserDefaults]) in
misc application, if i use
special key naming ex: GroupAppKeyName1, GroupAppKeyName2, ... ?
Yes, look in the list archives for solutions to this problem.
5 - I try to give Application archive of a project (build directory) to
a friend and he can't launch it...
(i use "Create Archive of xxxxx" Mac menu to build archive).
You probably use absolute rather than relative path references to files
in your project. That's a big no-no, and you should change it. Use the
Inspector in Project Builder (or Xcode) to change the paths of the
files to relative references.
(Note: With regards to the "Create Archive" functionality - keep in
mind that we're not allowed to discuss features of software that's
still under NDA on this list)
6 - How to prevent an application to be launched more than once?
For GUI applications this is done for you automatically by the OS. You
can launch GUI apps more than once, but not by accident. If you need
total control of this I assume that you need to use distributed
notifications, or other form of remote inter-process communication, in
order to find out if you'll allow the app to launch or not.
j o a r
_______________________________________________
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.