I’ve had my game working under windows for a while and just started to try
building it on the mac. It was very easy. Much easier then I thought.
So, now I’ve got the problem of converting the non-sdl code to the mac.
Since I’m sure some of you have had this kind of issue before I thought it
would be appropriate to ask.
What I need to do is have a function that opens a url. Basically the user
clicks a button, the function gets called, and the browser pops up. I’ve
never programmed on a mac before so this is probably very simple but I
just can’t find it in the docs.
Thanks
There are various ways of doing this (for example, NSWorkspace in
Cocoa). However, the easiest way I’ve found is to use the “open” shell
command, with the “system” stdlib.h function:
int result = system(“open http://www.apple.com”);
(see man for open, system())On Sunday, April 27, 2003, at 03:02 PM, sdl-request at libsdl.org wrote:
I've had my game working under windows for a while and just started
to
try building it on the mac. It was very easy.; Much easier then I
thought.
So, now I've got the problem of converting the non-sdl code to the
mac. Since I'm sure some of you have had this kind of issue
before I
thought it would be appropriate to ask.
What I need to do is have a function that opens a url.
Basically
the user clicks a button, the function gets called, and the browser
pops
up. I've never programmed on a mac before so this is probably
very
simple but I just can't find it in the docs.
Thanks