field to field

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
appmann
Posts: 33
Joined: Wed Oct 09, 2013 9:08 pm

field to field

Post by appmann » Fri Oct 18, 2013 11:51 am

Hi.

Im trying to paste text from field on mainstack to a field on substack.
I cant figure what the right order is to fx put text from field on card on stack from field on car on stack.

is it the destination location first or is it the "from" destination first?

And the order of pointing to object on stack on card.

Can someone help?

I think its very simple and logic.

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

Re: field to field

Post by Klaus » Fri Oct 18, 2013 12:16 pm

appmann wrote:I think its very simple and logic.
Yes :D
...
put (SOURCE DESCRIPTOR) into (TARGET DESCRIPTOR)
...
put fld "xyz" of cd 1 of stack "mmm" into fld "abc" of cd 2 of stack "kkk"
...

If fld "xyz" is on the current card (= where the script is being executed) you can omit the descriptor:
...
put fld "xyz" into fld "abc" of cd 2 of stack "kkk"
...

Best

Klaus

appmann
Posts: 33
Joined: Wed Oct 09, 2013 9:08 pm

Re: field to field

Post by appmann » Fri Oct 18, 2013 12:43 pm

Hi Klaus.

Thx for the reply.

whats wrong with this line?

put fld "profieldName" into fld "profilesName" of card id 1002 of stack "ProfileSub"

I cant make it working.

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

Re: field to field

Post by Klaus » Fri Oct 18, 2013 1:51 pm

Hi appman,

nothing wrong with the line, IF the name of the source field is really "profieldName" and not "profilesName"
AND the source field is on the current card when the scipt executes.


Best

Klaus

appmann
Posts: 33
Joined: Wed Oct 09, 2013 9:08 pm

Re: field to field

Post by appmann » Fri Oct 18, 2013 1:56 pm

Then the line is correct.

But does i have to specify if its a stack or a substack im pasting data to?

appmann
Posts: 33
Joined: Wed Oct 09, 2013 9:08 pm

Re: field to field

Post by appmann » Fri Oct 18, 2013 2:25 pm

OK.

Its working.

THX Klaus

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

Re: field to field

Post by Klaus » Fri Oct 18, 2013 5:33 pm

Hi appman,
appmann wrote:But does i have to specify if its a stack or a substack im pasting data to?
no.


Best

Klaus

Post Reply