cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: download an file on Mac OS X

From: Nick Zitzmann <nick_at_chronosnet.com>
Date: Mon, 11 Feb 2013 15:25:20 -0700

On Feb 11, 2013, at 1:56 PM, Jürgen Keser <jkeser_at_computerworks.de> wrote:

> 1.
> How can I save the .gz file on my mac? Is this the correct way how I try it?
> Should it work with the code you've sent me? (fp = fopen("/Path/To/Some/Place/Writable/curl-7.29.0.tar.gz", "w");)
> I am not in the office at the moment so I can test it tomorrow…

That was just an example path; you have to set the path to some place on your disk where your user account has permission to write things, e.g. your user home folder or /Users/Shared or /tmp or some place like that. If you're making a command line tool, then you might as well just omit the path components so it writes to the PWD.

> 2.
> The NSAlert Messages will be shown when i start the the Cocoa Application. So I think this should be correct.

It is not correct if you put them in main() as you did in your original message. Was that just an example? If you're actually doing this in a UI action, then you don't have to do these things because NSApplicationMain() already creates an autorelease pool and connects to the window server. But if you really are doing this in main(), then you have to manage memory and connect to the window server first.

But now we're leaving the scope of this list, so if you have any Cocoa-related questions, I'd suggest you take them to Apple's cocoa-dev mailing list: <https://lists.apple.com/mailman/listinfo/cocoa-dev>

Nick Zitzmann
<http://www.chronosnet.com/>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-11