Inconsistent bottomLeft behavior
Larry Snider
sniderl at gmail.com
Wed Jan 13 10:47:19 EST 2010
I'm trying to anchor a card to the bottom left corner of the screen
but I want to dynamically determine the screen size, card size, etc
and then change it's location.
When doing something like this I sometimes get "coordinate is not a
point" errors at run time...but not all the time, mind you. Putting
numbers in the coordinate position of bottomLeft works but not using a
variable.
on mouseDoubleUp
put the working screenRects into tSCR
--put item 4 of tSCR into tYHeight
--put "0," & tYHeight into tVarLoc
set the bottomLeft of this stack to 0,item 4 of tSCR
--set the bottomLeft of this stack to tVarLoc
put the decorations of this stack into tDecorations
switch tDecorations
case "title,minimize"
set the decorations of this stack to empty
break
case empty
set the decorations of this stack to "title,minimize"
break
default
set the decorations of this stack to "title,minimize"
break
end switch
end mouseDoubleUp
Can anyone guide me on the proper way to snap a card to the edge of
the screen? I'd like to add the option to choose which corner to
anchor to but if variables in the coordinates are sketchy I won't.
;-)
Thanks.
Larry
More information about the use-livecode
mailing list