• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What are argc and argv from Finder (was "Voodoo...")
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What are argc and argv from Finder (was "Voodoo...")


  • Subject: Re: What are argc and argv from Finder (was "Voodoo...")
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 29 Feb 2004 22:06:53 -0800

on 04/02/29 14:04, Jim Balhoff at email@hidden wrote:

> On Feb 29, 2004, at 4:32 PM, Jerry Krinock wrote:
>
>>> NSLog(); from main() writes to /var/log/system.log
>>> (which is read by Console.app) for a noprmal application start.
>>>
>> I wish it did, but not on my Mac running Panther, it doesn't. I
>> verified
>> that /var/log/system.log does indeed log unix calls from my
>> application, and
>> they print in Console.app as they occur. But this log does not get
>> NSLog()s
>> (or std::couts) from within int main(int argc, char* argv). These
>> outputs
>> do, however, go to Terminal when launching my app from the terminal,
>> just
>> the same as if they appeared somewhere in the app's "regular" code.
>
> Open Console.app and click on the "Logs" toolbar item to show the logs
> list. Select "console.log" instead of "system.log". I believe this
> log is located in /Library/Logs/Console/.
>
mmalc said the same thing, and I tried looking in that one, but still got
nothing. Don't worry about it, though. I wrote some code to write the
input arguments out to a file.

Just for the record, Bjoern is correct. The Finder passes two arguments.
The first one is the complete command and path, i.e.
"Applications/MyApp.app/Contents/MacOS/MyApp". The second argument is a
process serial number, such as: "-psn_0_27394049".

So now I can fix my problem.

Jerry
_______________________________________________
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.


References: 
 >Re: What are argc and argv from Finder (was "Voodoo...") (From: Jim Balhoff <email@hidden>)

  • Prev by Date: Re: NSDecimalNumber and 10.2.x: is this bug a secret?
  • Next by Date: Re: Does no one know a solution to this problem?
  • Previous by thread: Re: What are argc and argv from Finder (was "Voodoo...")
  • Next by thread: Re: What are argc and argv from Finder (was "Voodoo...")
  • Index(es):
    • Date
    • Thread