ENV

R

RVC planning

Mac OS X example scripts have the command (directive/statement/?)...
ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'

I can't find any write-up of this line anywhere. It's in
RSSPhotoViewer in Developer/Examples/Ruby/RubyCocoa/RSSPhotoViewer/
rb_main.rb

Can someone please explain what this is, what it does, and where it is
documented?
 
R

Reacher

Mac OS X example scripts have the command (directive/statement/?)...
ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'

I can't find any write-up of this line anywhere. It's in
RSSPhotoViewer in Developer/Examples/Ruby/RubyCocoa/RSSPhotoViewer/
rb_main.rb

Can someone please explain what this is, what it does, and where it is
documented?

I've never worked on a Mac, but the ENV hash en ruby is a mechanism
for accessing environment variables.

This:

# in ruby
ENV['PATH'] = '/usr/bin'

is equivalent to this:

/* in csh */
setenv PATH "/usr/bin"
 
S

Sebastian Hungerecker

RVC said:
ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'
[...]
Can someone please explain what this is, what it does, and where it is
documented?

ENV is a Hash-like object (but not a hash) that contains the environment
variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...' sets the
environment variable BRIDGE_SUPPORT_PATH to '...' for you and all processes
inheriting your environment.

HTH,
Sebastian
 
J

John Joyce

RVC said:
ENV['BRIDGE_SUPPORT_PATH'] = '/Volumes/Data/src/svn-rubycocoa-apple/
framework/bridge-support'
[...]
Can someone please explain what this is, what it does, and where
it is
documented?

ENV is a Hash-like object (but not a hash) that contains the
environment
variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
sets the
environment variable BRIDGE_SUPPORT_PATH to '...' for you and all
processes
inheriting your environment.

HTH,
Sebastian
indeed,
all this is doing is setting the path to the rubycocoa bridge,
they're setting that based on the location of the bridge as it is
with the shipped version of Leopard (10.5)
 
B

Benjamin Stiglitz

John said:
variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
ICQ: 205544826
indeed,
all this is doing is setting the path to the rubycocoa bridge,
they're setting that based on the location of the bridge as it is
with the shipped version of Leopard (10.5)

Actually, that was the developer’s path. You can (and should) safely
remove this line to use it on your machine, or set the path to a custom
version of BridgeSupport if you have one.
 
L

Laurent Sansonetti

John said:
variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
ICQ: 205544826
indeed,
all this is doing is setting the path to the rubycocoa bridge,
they're setting that based on the location of the bridge as it is
with the shipped version of Leopard (10.5)

Actually, that was the developer's path. You can (and should) safely
remove this line to use it on your machine, or set the path to a custom
version of BridgeSupport if you have one.

These lines were unfortunately left by error after a debugging
session, I just removed them :)

Laurent
 
J

John Joyce

John said:
On Feb 7, 2008, at 10:05 AM, Sebastian Hungerecker wrote:

variables of your environment. ENV['BRIDGE_SUPPORT_PATH'] = '...'
ICQ: 205544826

indeed,
all this is doing is setting the path to the rubycocoa bridge,
they're setting that based on the location of the bridge as it is
with the shipped version of Leopard (10.5)

Actually, that was the developer's path. You can (and should) safely
remove this line to use it on your machine, or set the path to a
custom
version of BridgeSupport if you have one.

These lines were unfortunately left by error after a debugging
session, I just removed them :)

Laurent
Thanks Laurent!
It's great to know that people at Apple are paying attention to
things outside of Apple!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top