Script Error "to" on attempt to change rect/location of a group of 5 controls

Sannyasin Brahmanathaswami brahma at hindu.org
Sun May 15 08:55:21 CEST 2016


I have a small group meant for a bottom tool bar on Mobile. I need to be able to "dock" to the bottom if we are in portrait orientation or to the left side if we are in landscape.

The group consists of a background graphic 50 px high and 414 wide.. with four SVG icon widgets

This codes seems straight forward

on setBottomNavtoSideAndBack pWhich
switch pWhich
case "Bottom"
set the rect of grc "bottomTabBkgnd" to 161,365,575,415
set the rect of grp "homeScreensBottomNav" to 161,365,575,415
set the loc of widget "go-home-portal" to 218,390
put the loc of widget "queue-content" to 315,390
put the loc of widget "add-favorites" to 404,390
put the loc of widget "settings-gear" to 498,390
break
case "Side"
set the rect of grc "bottomTabBkgnd" to 0,50,50,464
set the rect of grp "homeScreensBottomNav" to 0,50,50,464
set the loc of widget "go-home-portal" to 65,24
put the loc of widget "queue-content" to 100,24
put the loc of widget "add-favorites" to 150,24
put the loc of widget "settings-gear" to 175,24
break
end switch
show grp "homeScreensBottomNav"
end setBottomNavtoSideAndBack 
This fails and also throws an error that doesn't help understand what is wrong:

Message execution error:
Error description: Handler: can't find handler
Hint: to

My gut is telling me that there is some esoteric issue with this being a group and then trying to change both it's rect and the rect of its child elements. 

Any clues?

BR



More information about the use-livecode mailing list