Page 1 of 1
creating a new card with proprety of an other card
Posted: Wed Apr 04, 2012 12:43 pm
by Eldriden
Hello everyone,
i'm having a problem. Well, i have a button wich create a new card. But i don't know how in the same time it create buttons from an other card on the new card. I don't want to add them manually ! It's when i click on the button that those things are created. I also want to add a field with text in it on the new card.
Can someone help me please?
thanks
ps : my english isn't perfect yet :s.
Re: creating a new card with proprety of an other card
Posted: Wed Apr 04, 2012 1:08 pm
by Klaus
Hi Elridem
welcome to the forum!
You said "buttons from another card...", so you could just COPY these buttons to the new card?
...
copy btn "name of button here" of cd "the other card" to cd "the newly created card"
...
Or you can "create button" etc. check "create" in the dictionary!
Do also check "the templateXYZ", which comes very hand in these cases.
Best
Klaus
Re: creating a new card with proprety of an other card
Posted: Wed Apr 04, 2012 1:14 pm
by dunbarx
Are you wanting to duplicate cards or just add objects from one card to another? Klaus has addressed the second option.
For the first, check out the "clone" command in the dictionary.
You must also examine the ability to group objects, and set the "backGroundBehavior" of that group to "true". Then whenever you create a new card, that group will be duplicated as well. The entire set of objects on a card can be handled in this way, creating a common stack of cards all with the same objects.
Fields within that group can contain either the same text or text unique to the card they reside on. This is another property that is set at your command.
Craig Newman
Re: creating a new card with proprety of an other card
Posted: Wed Apr 04, 2012 1:23 pm
by Klaus
Hi Eldriden,
make sure to work through these stack:
http://www.runrev.com/developers/lesson ... nferences/
Great learning resource!
Best
Klaus
Re: creating a new card with proprety of an other card
Posted: Wed Apr 04, 2012 1:58 pm
by Eldriden
thanks a lot klauss and dumbarx. It's really what i wanted
Re: creating a new card with proprety of an other card
Posted: Mon Apr 09, 2012 1:10 pm
by Eldriden
hi once again,
I have an other problem. I searched everywhere but i didn't find any ressource about it.
When i click on a button, it create a button on an other stack.
No problem for that.
But i want that that button has a new script (for example go to card x).
Can someone help me?
Thanks,
Eldriden
Re: creating a new card with proprety of an other card
Posted: Mon Apr 09, 2012 1:34 pm
by Klaus
Hi Eldriden,
you can set the scipt of that new button via scipt, but there are limits in doing so, please check "scriptLimits" in the dictionary!
Basically you would do something like this, which will work for very short scripts like "go cd XYZ":
...
put "on mouseup" & CR & "go cd 2" & CR & "end mouseup" into tScript
## create your button here...
set the script of btn "the newly created button" of cd X of stack Y to tScript
...
Best
Klaus
Re: creating a new card with proprety of an other card
Posted: Mon Apr 09, 2012 2:00 pm
by Eldriden
thanks Klaus
It's simply perfect
