Hmm... that explains the strange behavior of lines too.

If I set up a field as a list box with records from a database:

put empty into x
revMoveToFirstRecord q

repeat for revNumberOfRecords(q) times
  put revDatabaseColumnNumbered(q, 1) & the lineDelimiter after x
  revMoveToNextRecord q
end repeat

put x into field "List Box"


The list box shows an empty line at the end, which can be selected. This is as I would expect it to be. However, when I tried to remove that empty line before the last "put" statement:


delete the last line of x


The empty line *and* the one before it went away. I then fixed it by changing the delete statement to:


delete the last char of x


Which works as I wish it to. So the list box field looks at that empty line as being a valid, usable line, but the other commands do not?


Is there a reason why this is also considered consistent?

On Sep 16, 2004, at 7:48 AM, Alex Tweedly wrote:

At 22:40 15/09/2004 -0500, J. Landman Gay wrote:

Except in other xtalk languages, including HyperCard where the custom started. ;)

"Items" are everything in between commas (or whatever the current delimiter is.) That includes carriage returns too.

but with one exception:

There can be a blank item between item delimiters
"dog,,cat" -- three items first is dog, second is empty, third is cat
or between the start of string and the first delimiter
",dog,cat" -- three items first is empty, second is dog, third is cat
BUT there can't be a blank between the last item delimiter and the end of string
"dog,cat," -- only two items, first is dog, second is cat


I still think this is inconsistent .... though Rob Cozen's description (drawing the analogy with lines and cr placement) helped a lot.

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

-----------------------------------------------------------
Frank D. Engel, Jr.  <[EMAIL PROTECTED]>



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com

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

Reply via email to