Page 1 of 1
Is a widget not an object?
Posted: Tue Feb 28, 2023 3:15 pm
by marksmithhfx
LC is complaining and won't allow me to write...
Code: Select all
copy widget "first" from cd "Home" to this cd
Any other approach to copying a widget from 1 cd to another?
Thanks
Mark
Re: Is a widget not an object?
Posted: Tue Feb 28, 2023 3:30 pm
by Klaus
Hi Mark,
this works:
Code: Select all
copy widget "first" OF cd "Home" to this cd
Probably because of the exact indentifier -> widget "first" of cd "Home"
Best
Klaus
Re: Is a widget not an object?
Posted: Tue Feb 28, 2023 3:55 pm
by dunbarx
Mark.
What Klaus said. But it is important to "parse" what you thought was the correct syntax in the first place. When you tried to identify the source object and its current location, you used "from". If you think about it, that would not make LC particularly happy. But:
copy widget "first" OF cd 1
Identifies the target object and its location properly and fully. To substitute "from" for "of" is jumping the gun, mixing a description of the location of that target with the desire to set up a source/destination construct.
One at a time is the answer here. The "to this cd" is all that is needed to specify the destination, and it is a separate clause.
Craig
Re: Is a widget not an object?
Posted: Wed Mar 01, 2023 4:39 pm
by marksmithhfx
Thanks guys!! Probably me just getting into the "natural" language thing a bit too much and forgetting, yes, LC does have its own particular brand of English.
