Yeah, to me it is... although I still agree that it's not an ideal
solution for a Cocoa application...
By the way, assuming you change char *args[] = { -a, Safari,
NULL }; to char *args[] = { /usr/bin/open, -a, Safari, NULL };
the exec* example actually works while the LaunchServices
Hi all,
I want to write a quick little cocoa app that fires off Safari.
I started with something like
int main(int argc, char* argv[]) {
...
...
if(execv(/Applications/Safari.app, someArgs) == -1) {
NSLog(@execv failed with %s, strerror(errno));
}
}
It always fails with 'Permission
Try executing /Applications/Safari.app/Contents/MacOS/Safari.
/Applications/Safari.app identifies a bundle, not the actual
application (and execv() is not aware of bundles).
--Kris
On Jul 1, 2008, at 10:15 AM, Barrie Green wrote:
Hi all,
I want to write a quick little cocoa app that
Why not use [NSWorkspace launchApplication:] method?
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWorkspace/launchApplication:
2008/7/1 Barrie Green [EMAIL PROTECTED]:
Hi all,
I want to write
You could also use /usr/bin/open -- then you wouldn't have to know
where safari lives.
execl(/usr/bin/open, /usr/bin/open, -a, Safari, 0);
On Jul 1, 2008, at 11:19 , Kristopher Matthews wrote:
Try executing /Applications/Safari.app/Contents/MacOS/Safari.
/Applications/Safari.app identifies
On Tue, Jul 1, 2008 at 11:30 AM, Jason Coco [EMAIL PROTECTED] wrote:
You could also use /usr/bin/open -- then you wouldn't have to know where
safari lives.
Abaddesignsayswhat? What do you think open uses anyway? ;-)
___
Cocoa-dev mailing list
On Jul 1, 2008, at 8:15 AM, Barrie Green wrote:
Hi all,
I want to write a quick little cocoa app that fires off Safari.
I started with something like
int main(int argc, char* argv[]) {
...
...
if(execv(/Applications/Safari.app, someArgs) == -1) {
NSLog(@execv failed with %s,
Another option (which may or may not work for you) is embedding a
WebKit view in your application window and using that to display web
stuff.
-- Ilan
On Jul 1, 2008, at 11:15 AM, Barrie Green wrote:
Hi all,
I want to write a quick little cocoa app that fires off Safari.
I started with
Barrie Green wrote:
Hi all,
I want to write a quick little cocoa app that fires off Safari.
...
Ideally I would like to run the app without it asking me for my
password, how could I achieve that?
Considering that I can think of no common purpose for launch Safari
that doesn't continue
On Tue, Jul 1, 2008 at 11:04 AM, Gregory Weston [EMAIL PROTECTED] wrote:
Barrie Green wrote:
Hi all,
I want to write a quick little cocoa app that fires off Safari.
...
Ideally I would like to run the app without it asking me for my
password, how could I achieve that?
Considering that
On Jul 1, 2008, at 8:53 AM, Kyle Sluder wrote:
On Tue, Jul 1, 2008 at 11:30 AM, Jason Coco [EMAIL PROTECTED]
wrote:
You could also use /usr/bin/open -- then you wouldn't have to know
where
safari lives.
Abaddesignsayswhat? What do you think open uses anyway? ;-)
With out looking at
On Tue, Jul 1, 2008 at 8:17 PM, Kevin Elliott [EMAIL PROTECTED] wrote:
Of course, they're both bad choices. As several people have pointed out,
NSWorkspace launchApplication or openURL depending on the requirements. If
it's not possible to use NSWorkspace (i.e. because you can't link against
What env pollution? I agree that exec* isn't really the way to go, but
that's what the OP was using... I just suggested that /usr/bin/open is
a better option than hard-coding the path to some arbitrary
application. It's also a lot easier to use than the LaunchServices
API... although if I
13 matches
Mail list logo