Did I dream this ?
Richard Gaskin
ambassador at fourthworld.com
Fri Mar 5 13:26:33 EST 2021
Jim Lambert wrote:
> They would be handy properties. But in the meantime try this behavior:
> getProp xLoc
> return item 1 of the loc of me
> end xLoc
>
> getProp yLoc
> return item 2 of the loc of me
> end yLoc
>
> After assigning the behavior to any object you can just use:
> put the xloc of someObject
> put the yloc of someObject
...as long as you are always 100% certain that nothing in your code nor
any third-party library you're using locks messages when you need to
access those virtual properties.
When you have the luxury of such assurance, virtual properties are a
wonderful code style.
But I rarely have that luxury, so I rarely use getProp/setProp.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list