Strange raw code problem
Strange raw code problem
- Subject: Strange raw code problem
- From: "Serge Belleudy-d'Espinose" <email@hidden>
- Date: Sun, 18 Nov 2001 09:47:12 +0100
(second try with another address as my previous message didn't show
for more than 24h)
I'm trying to script Network Setup Scripting with raw codes. One line says:
set xActivity to state of xStatus
where state is a constant with values idle/ connecting/ connected/
disconnecting/ unknown. If I check it against idle,
if xActivity is not idle
upon checking SE/Smile add () around idle
if xActivity is not (idle)
and on run NSS says something like "NSS doesn't understand the idle command."
So I tried to coerce the constant to a string and check against a string:
set xActivity to "" & state of xStatus
if xActivity is not "idle"
which works most of the time but not always; from time to time, state
will be coerced to
<<constant ****RAs1>>
wich is the raw code for idle, but if I type the code itself in the
script it is immediately translated to idle, and then the
parenthesis. So my last trick was to check xActivity against both
values:
if xActivity is not in {"idle", "<<constant ****RAs1>>"}
and it seems to always work, but it's really awkward. Of course there
is the fact that idle is also the reserver word for the handler but
still, the code works ok when writen straight w/o raw codes.
I wish someone has an explanation/better idea.
Thanks,
Serge
--
\\//\//\// Serge Belleudy-d'Espinose Institut Jacques Monod
// // //
http://www.ijm.jussieu.fr/ Universite Paris VII - Jussieu
//\//\//\\