J. Landman Gay wrote:

On 4/18/05 1:49 PM, R. Hillen wrote:

Hello,

I wrote:

on mouseUp
  set the itemdelimiter to "|"
  set the linedelimiter to "\"

  put "a" & linedelimiter into field "haha"
  put "b" & linedelimiter after field "haha"

  find "b" in field haha
 answer the number of lines of field haha & return & the foundline
end mouseUp


This Script return 2 lines with "b" found in line _1_ of field 1. I expected line 2 of field 1.

Am I wrong?


Wait a sec, I didn't read your message enough times before I answered.

The word "linedelimiter" can't be used the way you are doing it.

Yes you can - though my first thought was that you'd need to say "the linedelimiter"
put "a" & the linedelimiter into field "haha"
But in fact the field does get the correct value placed into it.


Try:

put "a\" into field "haha"
put "b\" into fld "haha"

Makes no difference.

You are doing text chunking, so this should work.

I think maybe the "find" command doesn't count as "text chunking" - if you do lineOffset("b", field "Field") you get the expected value of 2.


Alternatively, of course, lineDelimeter is a *local* value, and doesn't affect the vales used in other handlers - so if the find command is implemented as a handler then that would also explain this behaviour; note the docs don't say that it is - purely speculation.

--
Alex Tweedly       http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 18/04/2005

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to