• 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: Problems running UNIX Apps in Cocoa GUI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems running UNIX Apps in Cocoa GUI


  • Subject: Re: Problems running UNIX Apps in Cocoa GUI
  • From: Adam Eijdenberg <email@hidden>
  • Date: Mon, 25 Mar 2002 13:03:20 +1100

1) Call ./runref, wich create some LOG files and call ./reflect
2) ./reflect uses reflect.conf to obtain configurations
3) Running Confirmation appears in command line

** all files are located in the same folder

When I go to Terminal and run the application, it's perfect!!

However, running from the Aqua GUI... LOG files and CONFIG file must to be,
not in the same folder where are RUNREF and REFLECT, but in my root folder
(with Library, Applications, System, Users).

Any body knows why?? It is not a problem with the command line application
because it works fine from command line and in any folder I put the files
together.

It appears like GUI make command line app think it's in root folder, not
where it really is.

I'm no expert, but it sounds like your command line tools are creating your log files in the local working directory. If you call these from the terminal they appear to create the files in the same directory as the binaries reside only because you are cd'ing to that directory before you run them. To see what I mean, put runref in a directory called test, then cd to the directory above test and run "test/runref" (minus the quotes). Then your files will be created in the directory above test.

It looks as though when your GUI is calling the tools the working directory is set to "/" which I believe is 100% standard behavior.

If you require that these files are created in the same directory as the actual tools, then use argv [0] in your command line tools which I think lets you get the directory you want.

I'm sure this has come up before, check the archives for more info.

Hope that helps,
Adam
_______________________________________________
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: 
 >Problems running UNIX Apps in Cocoa GUI (From: Alberto <email@hidden>)

  • Prev by Date: Re: Problems running UNIX Apps in Cocoa GUI
  • Next by Date: Re: [ANN] My experiences with Apple
  • Previous by thread: Re: Problems running UNIX Apps in Cocoa GUI
  • Next by thread: Problems running UNIX Apps in Cocoa GUI
  • Index(es):
    • Date
    • Thread