buttons

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
smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

buttons

Post by smash » Mon Mar 09, 2009 12:07 pm

is there a code for buttons, for transfering text from several fields and putting them on another card.
i can do this for dropdown buttons, but not a straight out button
as i would like a one "enter" button that would transfer certain text from certain fields to one "say" invoice page ?
thanks

SparkOut
Posts: 2945
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Mon Mar 09, 2009 1:14 pm

Hi smash, nice to see you again.

It should be simple enough with a regular button rather than a drop down.

on mouseUp should trigger the action you want when you click the button.
In the button script you would have something like

Code: Select all

on mouseUp
  put field "field1" of this card into field "field1" of card "invoice"
  put field "field2" of this card into field "field2" of card "invoice"
  put field "field3" of this card into field "field3" of card "invoice"
  put field "field4" of this card into field "field4" of card "invoice"
end mouseUp
For anything more than a few simple lines to move then you make this more efficient and less to type/easier to update and maintain by doing more in the way of parsing the fields in a collection, but the above shows how simple it is to copy data from one place to another in a basic way.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Mar 09, 2009 4:38 pm

Hi Smash,

I wonder why I never heard back from you. What happened? Please contact me.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Mon Mar 09, 2009 10:01 pm

thanks sparky and mark,
i was in a car accident, have just started to rebuild my life again so to speak.
)))))waves at both of you ((((((
thanks sparkie

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Mar 09, 2009 10:44 pm

Hi Smash,

Sorry to hear about the accident. I hope you're well now.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Tue Mar 10, 2009 1:24 am

thanks mark, i am getting there
now i have four woosies of questions
1)
i am using multible choice boxes, and after i have made upto 6 choices, i am trying to press one button to transfer the information across to 6 different cards.
this what i am trying to use, but it keeps tlling me it can not find the card
on mouseUp


local theCardName

put "Entries" & menuPick into theCardName

if (field "BridleNumber" is not empty) and (field "HorsesName" is not empty) and (field "RidersName" is not empty) then

put field "BridleNumber" & tab & field "HorsesName" & tab & field "RidersName" & return after field "Entries" of card (theCardName)
put empty into field "BridleNumber"
put empty into field "HorsesName"
put empty into field "RidersName"
go card (theCardName)

else

answer "You have not completed the entry details correctly"

end if



end mouseUp
2) is there a code for a simple "print page" ?
and
3) here is the woosie.

how do you put one entries information on 6 different card, so they all go into the correct slot at 50 minute intervels ???
and how do you connect the times to a card.

and
4)
is their a code for a field, that gives a warning if you have used the same number more than once ?

thank you for all your help

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Tue Mar 10, 2009 3:37 am

i have found the print code thank you
wish everything was that simple he he he
thanks

Post Reply