 |
 |
Objective-C Help (how to find path to me)
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2003
Status:
Offline
|
|
I know in Applescript, you can use path to me to get a path to the file. Is there any similar thing in Objective-C?
Also, is there any way to get a list of all mounted volumes in Objective-C?
|
|
15 inch MacBook Pro 2.16 GHz, 2 GB RAM, 7200 RPM 100GB HDD.
Dual 2.5 GHz Power Mac G5, 1 GB RAM, 250 GB HDD, ATI Radeon X800XT.
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
See the documentation for NSBundle and NSWorkspace.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2003
Status:
Offline
|
|
I figured out how to use NSBundle to get the path to the executable, and how to use NSWorkspace. Thanks a lot.
One more question, how can I run a shell script using Objective-C?
|
|
15 inch MacBook Pro 2.16 GHz, 2 GB RAM, 7200 RPM 100GB HDD.
Dual 2.5 GHz Power Mac G5, 1 GB RAM, 250 GB HDD, ATI Radeon X800XT.
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Just as a piece of advice, you'd probably get things done a lot faster by looking through the documentation. In this case, NSTask is pretty much solely dedicated to running command-line programs.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
I'd recommend getting yourself a nice obj-c book like Aaron Hillegass's "Cocoa Programming for Mac OS X".
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2003
Status:
Offline
|
|
I have one more question (I ordered the book). How can I get a list of the contents of a directory?
|
|
15 inch MacBook Pro 2.16 GHz, 2 GB RAM, 7200 RPM 100GB HDD.
Dual 2.5 GHz Power Mac G5, 1 GB RAM, 250 GB HDD, ATI Radeon X800XT.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Originally posted by KraziKid:
I have one more question (I ordered the book). How can I get a list of the contents of a directory?
NSFileManager
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|