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!
But the position and rect is the same as source, how can i modify position or rect on card 3?
I tried this, but move the image on card 2 the new position
...
copy image "pic1" to card 3
## Now you are still on the SAME card, so you need to specify the correct ADDRESS of the image you want to modify:
set the rect OF image "pic1" OF CD 3 to "1203,174,1914,574"
## If that is what you mean.
...
on mouseUp
copy of image "pic1" to card 3
go to card 3
ask "Position:"
put it into tNumber
if the result = "cancel" then
exit to top
end if
set the rect image "pic1" to tNumber
end mouseUp
on mouseUp
## copy of image "pic1" to card 3
copy image "pic1" to card 3
go to card 3
ask "Position:"
put it into tNumber
if the result = "cancel" then
exit to top
end if
## set the rect image "pic1" to tNumber
set the rect OF image "pic1" to tNumber
end mouseUp
I am a bit picky in this respect, because, although it works currently, every new version of the LC engine is less forgiving with "sloppy" syntax! Believe me, I have been bitten by this fact several times in the last 21 years, and I have learned from that experience.
Listen to Klaus about being careful with syntax. LC, like Hypercard before it, thought that forgiving syntax would make users feel more comfortable.
It did.
But LC has moved more into the mainstream, and this sort of looseness is becoming untenable.
Anyway, it is very useful to know that you can do anything you want to on other cards, or even cards on other stacks, WITHOUT actually navigating there. That is what was really important in what he suggested.
There always seems to be at least 2 ways to achieve anything in LiveCode, and often many more: which is fantastic.
Algorithmic flexibility is very valuable. One should be able to consider many different ways to solve a given problem, as we'd expect in any good language.
Syntactic flexibility seems less useful, possibly counterproductive. Having multiple ways to express the same algorithm just adds noise to the mastery-acuisition process.
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
That's exactly what my narrow-minded Chemistry teacher said about titration calculations 42 years ago.
At University the Professor (when I asked her) said that 'how one got to the result' didn't matter as long
as the result was capable of being arrived at via a different route.
Syntactic flexibility seems less useful, possibly counterproductive. Having multiple ways to express the same algorithm just adds noise to the mastery-acuisition process.
I am with you 100%. Back in the (HC) day I selected, or rather my brain selected, (not the same thing) one version of each syntactical option. For example, describing a function given the "the" way or the "()" way. Never deviated. If there had been only one, I would still not have deviated.