nothing to see move along

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

nothing to see move along

Post by shawnblc » Fri Aug 29, 2014 5:56 pm

nothing to see, move along.
Last edited by shawnblc on Sat Aug 30, 2014 11:42 am, edited 2 times in total.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: [Beginner] Copy a label, rename label, add content.

Post by Klaus » Fri Aug 29, 2014 6:05 pm

Hi Shawn,

1.
## set the name of it to fld "fldTag"
## This is already field, so:
set the name of it to "fldTag"

2. Not sure why you put the content of a field back into the same field?
If that is just a typo and you mean the OTHER field, then...

"content" sounds like the right word, but isn't :D
You can do this:
...
set the TEXT of fld "fldTag" to the TEXT of fld "lblAll"
...
or just:
...
put fld "lblAll" into fld "fldTag"
...

Best

Klaus

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: [Beginner] Copy a label, rename label, add content.

Post by shawnblc » Fri Aug 29, 2014 7:50 pm

Thanks Klaus you put me on the right track and I got it working.

Now I'm trying to keep it going, adding to it and aligning new labels below the newly created labels (with code).

Before I ask for help I want to spend some time trying things out myself. Like right before I feel like smashing my Mac. Then I'll ask for help :)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: [Beginner] Copy a label, rename label, add content.

Post by dunbarx » Fri Aug 29, 2014 11:05 pm

Hi.

While you are at it, know that when you create a new field, whether by pasting a copy or actually creating a new one by script, the "last" keyword may be very useful to you:

set the label of the last field to "yourLabel"

Be careful, the last field might change if you are creating controls merrily along, and be aware that groups, alone of all objects, do not like that keyword at all.

Craig Newman

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: [Beginner] Copy a label, rename label, add content.

Post by shawnblc » Sat Aug 30, 2014 5:47 am

Nothing to see.
Last edited by shawnblc on Sat Aug 30, 2014 11:37 am, edited 1 time in total.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: [Beginner] Copy a label, rename label, add content.

Post by Simon » Sat Aug 30, 2014 8:19 am

Hi Shawn,
I trying to copy an existing label, rename the label and change the content.
errr "copy a label"???? Do you mean a field that happens to be a label?

I'm guessing you want the shape to be the same as fld AllFiles and it's position to be 3 px below.
Look up templateField in the dictionary.
Then use "create field "fldTag"" -- or whatever you are naming the new field
put fld "AllFiles" into fld "fldTag"

But then the ftp stuff is Wacked! Are you trying to append text to a file that is on a server?
At any rate the ftp is a different question entirely.
Write back with one question to solve then we can do the other.

Or... I've lost the plot entirely and you can skip this post.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: [Beginner] Copy a label, rename label, add content.

Post by shawnblc » Sat Aug 30, 2014 11:40 am

Simon wrote:Hi Shawn,
I trying to copy an existing label, rename the label and change the content.
errr "copy a label"???? Do you mean a field that happens to be a label?

I'm guessing you want the shape to be the same as fld AllFiles and it's position to be 3 px below.
Look up templateField in the dictionary.
Then use "create field "fldTag"" -- or whatever you are naming the new field
put fld "AllFiles" into fld "fldTag"

But then the ftp stuff is Wacked! Are you trying to append text to a file that is on a server?
At any rate the ftp is a different question entirely.
Write back with one question to solve then we can do the other.

Or... I've lost the plot entirely and you can skip this post.
Simon


I guess you didn't look at the code that is now deleted, huh? Didn't even read the first post probably. Back to my cave.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: nothing to see move along

Post by Simon » Sat Aug 30, 2014 4:22 pm

Simon
shawnblc wrote: I guess you didn't look at the code that is now deleted, huh? Didn't even read the first post probably. Back to my cave.
Now Shawn, are you pouting? I did read your full post. And I did copy your original question and answered that :)
Yep, pretty much ignored the code as you used "it" in an odd way.
Not sure why you deleted your post after Klaus, Craig and I tried to help you.
shawnblc wrote:nothing to see, move along.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: [Beginner] Copy a label, rename label, add content.

Post by jacque » Sat Aug 30, 2014 6:58 pm

dunbarx wrote: be aware that groups, alone of all objects, do not like that keyword at all.
Just a clarification: "Last" works in groups if you specify the group; i.e., "last field of grp 1".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply