Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A tough lingo q involving fields!

Status
Not open for further replies.

twistedlogic

Technical User
Jan 10, 2002
35
0
0
AU
ok... this is a hard one to describe

I am adding, via lingo, lines of text to a field. Each line has a different "item" on it, which is being accessed using the member(x).line[] format.

I have found that when this method is integrated into a field which uses word wrap my program is not finding the correct area, due to the fact that one "item" is split over two lines.

I speculate that this problem could be solved by using literally different item[]'s in the field.

As a default, the delimiter between text item[]'s is the "," and the default can be set via lingo.

Here is the problem at the moment

--->Message window
member(1).line[1].item[1] = "cat"
member(1).line[2].item[2] = "dog"
member(1).line[3].item[3] = "mouse"

put member(1).text
-- "cat,
dog,
mouse"

--->At this time all looks good,(except for the commas!) however, when we access...
put member(1).item[2] ---> we get
-- "
dog"

---> as you can see the item has a "return car" before it. I really need the result to be without the return. Hence, the logical thing to do would be to make the "return" the delimiter. This would simultaneously put each item on a new line, as well as allowing each to be accessed as seperate items.


Any ideas how this could be done?

thanks in advance
 
ok... I worked out this problem myself... and uncovered another... the solution was as follows

the itemDelimiter = Return

however now, I would like each item to have a line in between, so I speculate that the required delimiter would be 2 X Return, however I have tried:

the itemDelimiter = Return Return
and
the itemDelimiter = Return & Return

but neither works....

anyone know the correct syntax?

thanks in advance!
 
just chatting to myself here :)
I figured out that the delimiter must be 1 sybol only, which leaves me with a problem.

How can I put an empty line in between each item in a field?

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top