Works in a button but not in the message box

Thomas McGrath III mcgrath3 at mac.com
Sat Jul 21 12:53:22 EDT 2012


OK, Here's a question: 

Why does this line of code work in a button but throw an error when run in the message box?

set the rect of control "Container" to ((the left of this card + 5),(the bottom of group "nav bar" + 5),(the right of this card - 5),(the top of group "toolbar" - 5))

Message execution error:
Error description: value: error executing expression
Hint: set the rect of control "Container" to ((the left of this card + 5),(the bottom of group "nav bar" + 5),(the right of this card - 5),(the top of group "toolbar" - 5))

In a button the graphic "Container" will resize to fit between the navbar and toolbar with a 5 pixel margin.



What I was hoping to do is replace these lines of code with the above code.

  --   set the width of control "Container" to the width of this card -10
   --   put (the top of group "toolbar" - 5) - (the bottom of group "nav bar" +5) into tContainerHeight
   --   set the height of control "Container" to tContainerHeight
   --   set the topLeft of control "Container" to 5,(the bottom of group "nav bar" +5)

Thanks

-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net





More information about the use-livecode mailing list