cbarbal wrote: ↑Fri Nov 23, 2018 7:39 pm
Regarding
send script "clearAllPisos" of card "Pisos" in the second image you see: "send script message to object"
For me is not wrong syntax, send script message ("clearAllPisos") to object (of card "Pisos")
English:
For the record, I do not want to argue with someone who knows a lot more about LiveCode than me and who is helping me. For what I thank you and all those who have helped me in this forum.
When the "send" did not work I searched for an alternative that was "send script". If what LiveCode offers is not right, turn it off and let's go
Just some input that may (or may not) help a *little*.
The autocomplete statements your looking at (pictures 1 & 2) give you a general indication of the code that follows. lets see if we can break it down a bit more understandably.
C go card
"C" = command
"go" is the command
"card" is where your going, but you have to supply the card identifier, such as card 1, card "name", card id 1008, etc.
As far as I am aware, though, you can't just put "go card "myCard" (at least in the versions I use), you have to include "to", so it reads
I could be wrong, though, this is the second time I've come across the statement written that way, hopefully someone else has more input to add to this.
Now for the 'object' misunderstanding.
cbarbal wrote: ↑Fri Nov 23, 2018 7:39 pm
For me is not wrong syntax, send script message ("clearAllPisos") to object (of card "Pisos")
I can see why it is confusing to look at, but think of it like this. If you had a button, field, graphic, etc., you might write code like (bold marks for clarity)
send script "clearAll" to button "myButton" of card "myCard"
Of course, in this case we are trying to send the code to the card itself, so it would read
send script "clearAll" to card "myCard"
The only time you would include "of" in this instance is if you were clarifying which stack card "myCard" was part of, like this
send script "clearAll" to card "myCard" of stack "myStack
I hope that helps some.
*Edit - apparently Klaus beat me to the answer, and was more concise as well