adding info to fld

Viktoras Didziulis viktoras at ekoinf.net
Sun Nov 12 13:27:44 CST 2006


Whoops, thanks for correction :-) 
 
 
-------Original Message------- 
 
From: Ken Ray 
Date: 11/12/06 20:37:27 
To: Use Revolution List 
Subject: Re: adding info to fld 
 
On 11/12/06 11:47 AM, "Viktoras Didziulis" <viktoras at ekoinf.net> wrote: 
 
> put fld "tnewscommentshock" & return after fld "shockcomment" 
 
Actually, it would be the reverse (put the return first): 
 
put return & fld "tnewscommentshock" after fld "shockcomment" 
 
However keep in mind that the first time this is executed, if fld 
"shockcomment" is empty, you'll get a leading <return> character that you 
probably don't want. 
 
Here's one way to do it: 
 
if fld "shockcomment" is empty then 
put fld "tnewscommentshock" into fld "shockcomment" 
else 
put return & fld "tnewscommentshock" after fld "shockcomment" 
end if 
 
Another way is to "trim" the data (there was a discussion here that putting 
word 1 to -1 of a string would trim off any leading/trailing white space) 
and do it in one go (watch line wraps): 
 
put word 1 to -1 of (fld "shockcomment" & return & fld "tnewscommentshock") 
into fld "shockcomment" 
 
Anyway, that gives you some ideas... 
 
Ken Ray 
Sons of Thunder Software, Inc. 
Web site: http://www.sonsothunder.com/ 
Email: kray at sonsothunder.com 
 
_______________________________________________ 
use-revolution mailing list 
use-revolution at lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences: 
http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list