For Programmers: Free Programming Magazines  


Home > Archive > Smalltalk > April 2007 > Accessing System or User Variables









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Accessing System or User Variables
jtzecher

2007-03-30, 7:07 pm

Greetings,

I just discovered that the root cause to my previous problem with
Excel had to do with my inability to read the system (or should I say
user) variable TEMP to find out where temporary files should be
written. Many thanks to those that responded to my original question.
Please don't ask me to document the train of analysis that got me
there.

The question I have now is: How do I find out the value of the
System Variable TEMP from within VA Smalltalk? I know there must be a
simple way but perusals of the documentation have not led me to it.

Thank you,
jtzecher

Normand Mongeau

2007-03-30, 7:07 pm

'temp' abtScanEnv

Normand



"jtzecher" <joel.zecher@ge.com> wrote in message
news:1175276496.350520.237550@l77g2000hsb.googlegroups.com...
> Greetings,
>
> I just discovered that the root cause to my previous problem with
> Excel had to do with my inability to read the system (or should I say
> user) variable TEMP to find out where temporary files should be
> written. Many thanks to those that responded to my original question.
> Please don't ask me to document the train of analysis that got me
> there.
>
> The question I have now is: How do I find out the value of the
> System Variable TEMP from within VA Smalltalk? I know there must be a
> simple way but perusals of the documentation have not led me to it.
>
> Thank you,
> jtzecher
>



craigslist.jg@gmail.com

2007-03-30, 7:07 pm

On Mar 30, 1:41 pm, "jtzecher" <joel.zec...@ge.com> wrote:
> Greetings,
>
> I just discovered that the root cause to my previous problem with
> Excel had to do with my inability to read the system (or should I say
> user) variable TEMP to find out where temporary files should be
> written. Many thanks to those that responded to my original question.
> Please don't ask me to document the train of analysis that got me
> there.
>
> The question I have now is: How do I find out the value of the
> System Variable TEMP from within VA Smalltalk? I know there must be a
> simple way but perusals of the documentation have not led me to it.
>
> Thank you,
> jtzecher


Try:

'TEMP' abtScanEnv
'PATH' abtScanEnv
etc...

Eliot Miranda

2007-03-31, 4:15 am

Normand Mongeau wrote:
> 'temp' abtScanEnv


Ah, there's nothing like an intension revealing selector, right?
Right...
[color=darkred]
> "jtzecher" <joel.zecher@ge.com> wrote in message
> news:1175276496.350520.237550@l77g2000hsb.googlegroups.com...
[snip][color=darkred]


--
The surest sign that intelligent life exists elsewhere in Calvin &
the universe is that none of it has tried to contact us. Hobbes.
--
Eliot ,,,^..^,,, Smalltalk - scene not herd
jtzecher

2007-04-02, 8:07 am


> Try:
>
> 'TEMP' abtScanEnv
> 'PATH' abtScanEnv
> etc...


Many thanks. That is awesome.
One question, though. Is there any way to get around the old DOS 8.3 /
Windows 95 naming conversion limitation when parts of the directory
structure exceed the 8 characters?

'C:\DOCUME~1\213007~1\LOCALS~1\Temp'

Normand Mongeau

2007-04-02, 7:11 pm


"jtzecher" <joel.zecher@ge.com> wrote in message
news:1175514925.089416.285020@y66g2000hsf.googlegroups.com...
>
>
> Many thanks. That is awesome.
> One question, though. Is there any way to get around the old DOS 8.3 /
> Windows 95 naming conversion limitation when parts of the directory
> structure exceed the 8 characters?
>
> 'C:\DOCUME~1\213007~1\LOCALS~1\Temp'
>


hmm, not sure what you mean here. The above string is a perfectly valid
path, try to open a file in that directory using that path, and you'll see
that it works.

What's the exact situation you're trying to solve?

Normand


Louis LaBrunda

2007-04-02, 7:11 pm

>> 'TEMP' abtScanEnv
[color=darkred]
>Many thanks. That is awesome.
>One question, though. Is there any way to get around the old DOS 8.3 /
>Windows 95 naming conversion limitation when parts of the directory
>structure exceed the 8 characters?


>'C:\DOCUME~1\213007~1\LOCALS~1\Temp'


I think the path for 'Temp' as saved/set as a short dos path and is therefore
returned as such. If you try 'PATH' abtScanEnv, you will probably see a long
path.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
jtzecher

2007-04-02, 7:11 pm

On Apr 2, 10:05 am, "Normand Mongeau" <nmongeau@no_s...@videotron.ca>
wrote:
> "jtzecher" <joel.zec...@ge.com> wrote in message
>
> news:1175514925.089416.285020@y66g2000hsf.googlegroups.com...
>
>
>
>
>
>
>
> hmm, not sure what you mean here. The above string is a perfectly valid
> path, try to open a file in that directory using that path, and you'll see
> that it works.
>
> What's the exact situation you're trying to solve?
>
> Normand


I guess I should have tried it before I asked. Basically, I was just
trying to change the directory as shown below. Before I tried, I
looked at the path and saw all of the "~" in them and just *assumed*
it wouldn't work. I won't repeat the old saw about assumptions. Looks
like I have exactly what I need. Many thanks!!!


CfsDirectoryDescriptor chdir: ('TEMP' abtScanEnv).

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com