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!
I have no idea why this does not work, but I just tested a bit and foud this workaround (two buttons selected):
...
put the selectedobjects into tSelObj
put the num of lines OF the selectedobjects
## Got 0!!???
answer the num of lines of tSelObj
## I got "2"
...
The reason I need the script to be in a button is because I'm making a plugin. At the moment it works fine for single objects but I need it to cycle through ALL the selected objects.
on mouseUp
repeat with x=1 to the number of lines in the selectedObject
set the text of (line x of the selectedObject) to fld "Replacement"
end repeat
end mouseUp
But because the lines of the selected object are not recognised it doesn't work?
on mouseUp
put the selectedObject into tSelObj
repeat with x=1 to the number of lines in tSelObj
set the text of (line x of tSelObj) to fld "Replacement"
end repeat
end mouseUp