how to add a field to a new created card

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
nicksavill
Posts: 1
Joined: Wed Oct 30, 2013 12:43 am

how to add a field to a new created card

Post by nicksavill » Wed Oct 30, 2013 12:53 am

Hi

I want to dynamically create a new card then add a field to it, something like

on mouseUp
create card "test"
create field "test" in card "test"
end mouseUp

This of course doesn't work. Any ideas how to do it? Should be very easy but I've just spent the last hour searching the the documentation and forums with no success.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: how to add a field to a new created card

Post by FourthWorld » Wed Oct 30, 2013 1:25 am

Just use the "create field" command by itself, and the card that has focus will receive it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: how to add a field to a new created card

Post by Simon » Wed Oct 30, 2013 1:29 am

I was thinking that nicksavill could just group a field then select "behave like background" then there wouldn't be a need to create the new field as it would just come with the new card.

But that was a understanding leap on my part.

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

Post Reply