From: kimura w. <ki...@us...> - 2008-02-09 00:56:35
|
Hi, It works for me on 10.5.1. LSEnvironment is available for apps launched via Launch Service. - double-click in Finder - launch with "open" command LSEnvironment is not available without Launch Service. - "Run" on Xcode - execute YourApp.app/Contents/MacOS/YourApp directly On Thu, 7 Feb 2008 13:01:14 -0600, Brian Marick wrote: > Using RubyCocoa from Leopard (10.5.1) : > > You can declare environment variables in a Cocoa app's Info.plist file > like this: > > <key>LSEnvironment</key> > <dict> > <key>VEX</key> > <string>acious!</string> > </dict> > > In an Objective-C app, that value carries over into the environment: > > NSDictionary *env = [[NSProcessInfo processInfo] environment]; > NSLog(@"====Here is the value of VEX in the processInfo > environment: %@", > [env objectForKey:@"VEX"]); -- kimura wataru |