For as long as I've been using LiveCode, when checking a property of an object in an if statement, Checking the visibility of an image for example, I would do it something like this:
Code: Select all
If the visible of image "MyImage" is true then
dostuff
else
dootherstuff
end if
It results in shorter, if slightly less readable code.
Code: Select all
if visible(img "MyImage") then
dostuff
else
dootherstuff
end if
Code: Select all
put height(this stack)
Has it always been this way? Is referring to the property as a function in this context correct? Or is this something else entirely? I see it's not mentioned in the LiveCode lesson on properties, or anywhere else that I've found...Can anybody shed some light on what is going on here on a deeper level?
--Sefro