Post
by FourthWorld » Thu Mar 01, 2018 3:59 pm
If you're dealing with selected text (or even objects) the command is simply "copy". Couldn't get simpler.
But if you want to programmatically alter the clipboard without user intervention, that much less common use case requires less common syntax.
The reason for the array is that the range of ways in which a programmer might want to work with the clipboard can be quite vast, and clipboard structures provided by the OS are somewhat complex.
Indeed, even the most complicated LiveCode syntax for directly manipulating clipboard contents across platforms is far simpler than the OS APIs for any one of them.
An array variable is more complex than a simple string, but programming isn't natural language, and arrays are a very useful structure commonly available in nearly every programming language for their efficiency and utility.