separate yes, in one button no
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
separate yes, in one button no
In button "try" I put this script:
on mouseUp
create card "mies"
set the backgroundcolor of card "mies" to red
copy field "inhoud" to card "mies"
copy group "velden" to card "mies"
copy button "terug" to card "mies"
end mouseUp
It completes line 1 and 2, but no more
In button copy I put the rest of this scipt"
on mouseUp
copy group "velden" to card "mies"
copy button "terug" to card "mies"
copy field "inhoud" to card "mies"
end mouseUp
so in one button NO in 2 buttons YES
WHY NOT IN 1 BUTTON ? What's wrong???
on mouseUp
create card "mies"
set the backgroundcolor of card "mies" to red
copy field "inhoud" to card "mies"
copy group "velden" to card "mies"
copy button "terug" to card "mies"
end mouseUp
It completes line 1 and 2, but no more
In button copy I put the rest of this scipt"
on mouseUp
copy group "velden" to card "mies"
copy button "terug" to card "mies"
copy field "inhoud" to card "mies"
end mouseUp
so in one button NO in 2 buttons YES
WHY NOT IN 1 BUTTON ? What's wrong???
-
- Livecode Opensource Backer
- Posts: 447
- Joined: Mon Jan 23, 2012 12:46 pm
Re: separate yes, in one button no
Try specifying what card the objects to be copied are on, like this :
That might help!
--sefro
Edit:
Explanation: when you "create card" you go directly to the card you just created, so when you try to copy the objects you need to specify what card they are on.
check out create card and backgroundBehavior in the dictionary
Code: Select all
on mouseUp
create card "mies"
set the backgroundcolor of card "mies" to red
copy field "inhoud" of cd "yourcardhere" to card "mies"
copy group "velden" of cd "yourcardhere" to card "mies"
copy button "terug" of cd "yourcardhere" to card "mies"
end mouseUp
--sefro
Edit:
Explanation: when you "create card" you go directly to the card you just created, so when you try to copy the objects you need to specify what card they are on.
check out create card and backgroundBehavior in the dictionary
Re: separate yes, in one button no
Sefro,
I translated your example as:
on mouseUp
create card "mies"
set the backgroundcolor of card "mies" to red
copy field "inhoud" of cd "PK" to card "mies"
copy group "velden" of cd "PK" to card "mies"
copy button "terug" of cd "PK" to card "mies"
end mouseUp
but very sorry: it does not work !
Like with me: a red card "MIES" is created, but empty...
Next question:
How can I add a line to the content of field "inhoud" of card "PK" BY SCRIPT
I translated your example as:
on mouseUp
create card "mies"
set the backgroundcolor of card "mies" to red
copy field "inhoud" of cd "PK" to card "mies"
copy group "velden" of cd "PK" to card "mies"
copy button "terug" of cd "PK" to card "mies"
end mouseUp
but very sorry: it does not work !
Like with me: a red card "MIES" is created, but empty...
Next question:
How can I add a line to the content of field "inhoud" of card "PK" BY SCRIPT
Re: separate yes, in one button no
Hi robm80,
it works here liveCode 6.5
Simon
it works here liveCode 6.5
Simon
- Attachments
-
- robm80.zip
- LC 6.5
- (792 Bytes) Downloaded 212 times
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: separate yes, in one button no
How can I add a line to the content of field "inhoud" of card "PK" BY SCRIPT
Code: Select all
put "here I am" into fld "inhound"
Study this if you are not:
http://lessons.runrev.com/s/lessons/m/4 ... ssage-path
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: separate yes, in one button no
I also have 6.5, but here it does not work ???it works here liveCode 6.5
This is my script and it is OKHow can I add a line to the content of field "inhoud" of card "PK" BY SCRIPT
put crlf & "Gijs" after fld "inhoud"
Re: separate yes, in one button no
Hi robm80,
The whole thing or just part?
Is there an error message?
Need more than "doesn't work" as using your exact script works fine here.
You will need more post (10 I think) before you can post a stack so if you have a dropbox account post your stack there.
Simon
Are you saying the stack I posted is not working?I also have 6.5, but here it does not work ???
The whole thing or just part?
Is there an error message?
Need more than "doesn't work" as using your exact script works fine here.
You will need more post (10 I think) before you can post a stack so if you have a dropbox account post your stack there.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: separate yes, in one button no
Up till now, my first step in LC was succesfull, but now I meet an abnormality I cannot understand:
When I create a new card by: create card or create card "foo" or what else , I get a black card looking like this: WHY: I have LC 6.5.0
When I create a new card by: create card or create card "foo" or what else , I get a black card looking like this: WHY: I have LC 6.5.0
Re: separate yes, in one button no
Forget last posting: solution is: set backgroundcolor of this card to white.
But I have a real problem:
I have created a card called "foo"
A line in the scrolling list field "mycontent" is also "foo" and this line is selected!
In the messagebox I write "go to card "foo" and card "foo" is present.
Now I write in the messagebox: go to card (selectedtext of field "mycontent") and the answer is "no such card".
And this while in another try it worked perfectly.
Is there anyone who can explain this to me?
Thanks
Rob
But I have a real problem:
I have created a card called "foo"
A line in the scrolling list field "mycontent" is also "foo" and this line is selected!
In the messagebox I write "go to card "foo" and card "foo" is present.
Now I write in the messagebox: go to card (selectedtext of field "mycontent") and the answer is "no such card".
And this while in another try it worked perfectly.
Is there anyone who can explain this to me?
Thanks
Rob