"Can't set property" returned upon trying to set the hScroll, vScroll of a group from card script
Jessica McBeck
jmcbeck at gmail.com
Tue Jul 10 14:34:24 EDT 2012
Hi all,
I am attempting to set the hScroll and vScroll of a group from a card's
script. This card does not contain the group. Here's the script:
set the vScroll of group "ScrollingGroup" of card this_Card of stack
this_Stack to y
set the hScroll of group "ScrollingGroup" of card this_Card of stack
this_Stack to x
But during runtime livecode returns the error "Can't set property".
However, when I place a button on this_Card with the script
on mouseDown
put the vScroll of group "ScrollingGroup" into v
add 10 to v
set the vScroll of group "ScrollingGroup" to v
end mouseDown
the group scrolls as expected. So then I tried calling a "send" command to
the button from the card script with the necessary scroll values and got
the same "Can't set property" error message. Here's that code:
In the card this_Card script:
send "scrollMe" && x_b & comma && y_b to button "set scroll"
In the button "set scroll" script:
on scrollMe scrollX, scrollY
set the vScroll of group "ScrollingGroup" to scrollX
set the hScroll of group "ScrollingGroup" to scrollY
end scrollMe
I imagine the problem is related to the linear flow of the message path,
but cannot think of a clever work-around. Any suggestions are greatly
appreciated!
Thanks,
Jess
More information about the use-livecode
mailing list