I'm currently trying to make a new "class" in Applescript. I know that, without making an application, it is technically impossible.
But I tried to mimic it with an embedded script:
script specialText
property value : ""
on flip()
return reverse of (characters of my value) as string
end flip
end script
set x to specialText
set value of x to "Hello World"
x's flip()
This works great and returns "dlroW olleH" as expected, however:
script specialText
property value : ""
on flip()
return reverse of (characters of my value) as string
end flip
end script
set x to specialText
set value of x to "Hello World"
x's flip() = specialText's flip()
This returns true.
So my question now is, can I do something like this without making the new variable a reference to the original?