Thanks Andy, that does actually work (and it helped me uncover a different kind of bug involving the script editor ~!
**Bonus gravy!!)
The question becomes *why* do you need the qualifier/descriptor?
In other words, if you were writing this out with a fixed line already in mind, would you not write it something like -
Code: Select all
put word -1 of line 1 of field 1 into myWord
The selectedLine gives you the insertion point exactly like that, "line x of field y". Why doesn't the statement work using the selectedLine? (I know, this is above our pay grade, but I think the question is legitimate).
**Bonus gravy!! -
1. set up a field on a stack, type some words into it.
2. in the script editor, put the following code -
Code: Select all
put word -1 of the text of the selectedLine into myLine
3. set a breakpoint at that line
4. in the field, hit the space bar
5. the selectedLine becomes the line in the editor, and returns the last word of that line

- Ummmmmmmm.......
*Edit - actually, a trip through the qdb showed me this is a long standing problem
https://quality.livecode.com/show_bug.cgi?id=6425
https://quality.livecode.com/show_bug.cgi?id=6988
https://quality.livecode.com/show_bug.cgi?id=12640
https://quality.livecode.com/show_bug.cgi?id=21219