Page 1 of 1

nothing to see move along

Posted: Fri Aug 29, 2014 5:56 pm
by shawnblc
nothing to see, move along.

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

Posted: Fri Aug 29, 2014 6:05 pm
by Klaus
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

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

Posted: Fri Aug 29, 2014 7:50 pm
by shawnblc
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 :)

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

Posted: Fri Aug 29, 2014 11:05 pm
by dunbarx
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

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

Posted: Sat Aug 30, 2014 5:47 am
by shawnblc
Nothing to see.

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

Posted: Sat Aug 30, 2014 8:19 am
by Simon
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

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

Posted: Sat Aug 30, 2014 11:40 am
by shawnblc
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.

Re: nothing to see move along

Posted: Sat Aug 30, 2014 4:22 pm
by Simon
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

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

Posted: Sat Aug 30, 2014 6:58 pm
by jacque
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".