Re: Bug or feature? or: Don't I love the mechanics of expansion

2003-03-19 Thread Ben Rubinstein
on 17/3/03 1:42 am, Victor Eijkhout wrote

> Reading the man page for "send". It says (I couldn't manage to
> cut/paste from the dictionary. is that possible?)

Geoff's responded on your main point, explaining how what looks like runaway
expansion is actually quite reasonable and predictable.  But in answer to
your question: hold down the option (alt) key and run the mouse over the
text you want to grab: it will be placed in your clipboard.

It isn't intuitive, but it's handy and it works!

(It's documented in the 'tips' stack - not sure if it's anywhere else.  I
find that it's worth flipping all the way through the tips stack every now
and then - something usually catches my eye that wasn't relevant to me the
last time, but is now.  Also, I have it set to show me a tip once a day -
that's often enough to be useful, but not so often it's annoying if I'm
having a bad day..)

regards,
 
  Ben Rubinstein   |  Email: [EMAIL PROTECTED]
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com|  Fax  : +44 (0)1273-728866


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Bug or feature? or: Don't I love the mechanics of expansion

2003-03-17 Thread Geoff Canyon
Exactly one step of evaluation is performed. So if you say

send "tt the aaa of me"

it will in fact work, and result in "a" being put. When you say

send tt && the aaa of me

What happens is that tt && the aaa of me is resolved (by the && 
operator) into "tt a" which is then passed to the evaluator for that 
one step of evaluation, which results in "a" being interpreted as a 
variable, resulting in 1 in the message box.

On Sunday, March 16, 2003, at 05:42 PM, Victor Eijkhout wrote:

This bug took me an hour or two to find. I don't think I like it.

on tt arg
  put arg
end tt
on t
  set the aaa of me to "a"
  put 1 into a
  send "tt" && the aaa of me to me
end t
Guess what the outcome of `send "t" to field "whatever" is...

Reading the man page for "send". It says (I couldn't manage to 
cut/paste from the dictionary. is that possible?) "If the message is 
more than one word, it must be enclosed in double quotes". That is 
clearly not true in the above case.

It also says "Any parameters are evaluted", giving  as example. That is less than the whole truth: based on this I 
would write  which of course is completely 
incorrect.

Anyway, solution:

send "tt" && quote & the aaa of me & quote

I guess the correct statement would be

"send expr to  :

the "expr" is an expression that yields a string of the form "command 
arg1,arg2,...". The "argn" expressions are evaluated in the corrent 
context, and the resulting command is sent to the whatever handler."

Ok, quiz time: what is the output of

on t arg1,arg2
  put arg1
end t
on tt
  set the aa of me to 3,4
  send "t" && the aa of me to me
end tt
(I guess, for clarity, another clause is could be added in the above 
definition.)
--
Victor Eijkhout <[EMAIL PROTECTED]>
tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
http://www.cs.utk.edu/~eijkhout/
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


regards,

Geoff Canyon
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Bug or feature? or: Don't I love the mechanics of expansion

2003-03-16 Thread Victor Eijkhout
This bug took me an hour or two to find. I don't think I like it.

on tt arg
  put arg
end tt
on t
  set the aaa of me to "a"
  put 1 into a
  send "tt" && the aaa of me to me
end t
Guess what the outcome of `send "t" to field "whatever" is...

Reading the man page for "send". It says (I couldn't manage to 
cut/paste from the dictionary. is that possible?) "If the message is 
more than one word, it must be enclosed in double quotes". That is 
clearly not true in the above case.

It also says "Any parameters are evaluted", giving  as example. That is less than the whole truth: based on this I 
would write  which of course is completely 
incorrect.

Anyway, solution:

send "tt" && quote & the aaa of me & quote

I guess the correct statement would be

"send expr to  :

the "expr" is an expression that yields a string of the form "command 
arg1,arg2,...". The "argn" expressions are evaluated in the corrent 
context, and the resulting command is sent to the whatever handler."

Ok, quiz time: what is the output of

on t arg1,arg2
  put arg1
end t
on tt
  set the aa of me to 3,4
  send "t" && the aa of me to me
end tt
(I guess, for clarity, another clause is could be added in the above 
definition.)
--
Victor Eijkhout <[EMAIL PROTECTED]>
tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
http://www.cs.utk.edu/~eijkhout/
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution