put text fields together

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

put text fields together

Post by reelstuff » Sat Apr 05, 2008 3:47 pm

Hello,

I am working with some fld values, and putting them together from one field to another, like this,

button one

Code: Select all

put the text of fld var_one into me
  put me into fld var_two
button two

Code: Select all

put the text of fld var_two into me
  put the text of fld var_three after me
  put me into fld var_four

this works well, however all the values from the text fields run together,

Code: Select all

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
This would work ok I think for parsing the script, however, from a readability standpoint, it would be nice to put something inbetween them so each value would appear on its own line like this,

Code: Select all

document.write('<object classid="clsid:D27CDB6EAE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"');
So now I am wondering how I could put the text of the fields on a separate line
so that the output is easier to verify that the code is correct.

Thanks in advance for any suggestions or pointers.

Tim

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Sat Apr 05, 2008 4:21 pm

Code: Select all

put return & field 2 after me
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

thank you

Post by reelstuff » Sat Apr 05, 2008 4:25 pm

BvG wrote:

Code: Select all

put return & field 2 after me
Thank you, again, that works great, Tim

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Post by Nonsanity » Wed Apr 09, 2008 10:02 pm

Just as a simplification...

Code: Select all

put fld var_two & return & fld var_three into fld var_four
...If you don't really need all that text in the contents of the button (which usually isn't visible) for some other reason.
~ Nonsanity
~ Chris Innanen

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

Post by reelstuff » Wed Apr 09, 2008 10:14 pm

Nonsanity wrote:Just as a simplification...

Code: Select all

put fld var_two & return & fld var_three into fld var_four
...If you don't really need all that text in the contents of the button (which usually isn't visible) for some other reason.
Hi, thanks for your reply, I probably need to change my approach to doing this and will likely do that, I am currently on the third innovation of this little experiment, thanks for the post, I will file that,

Tim

Post Reply