revRotatePoly Pilot Error?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm
Location: NE USA

revRotatePoly Pilot Error?

Post by WaltBrown » Thu Dec 03, 2015 12:41 pm

I have this subroutine in 7.0.1C:

Code: Select all

on idRotate pParms
   local tObjectName, tRotation
   put item 1 of pParms into tObjectName
   put item 2 of pParms into tRotation
   answer pParms
   revRotatePoly tObjectName, tRotation
   // set the width of grc tObjectName to 300
   answer "Done"
end idRotate
The first "answer" gives me the appropriate parameter values. The object does not rotate, the second "answer" is not executed, and revRotatePoly appears to execute an "exit to top" - no errors, and control returns. I have the same results in 5.5.5 and 8.0. It is a "polygon" and I have tried the trick I saw from Berndt to set the points to the effective points. If I replace the revRotatePoly line with a test (commented out in the above code) it works and the second answer executes.

Any ideas of what I'm doing wrong? I have had revRotatePoly working in the past, but I must be having a senior moment, I can't get this to work.
Thanks!
Walt Brown
Omnis traductor traditor

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm
Location: NE USA

Re: revRotatePoly Pilot Error?

Post by WaltBrown » Tue Dec 08, 2015 1:10 pm

This solution worked:

Code: Select all

on idRotate pParms
   local tObjectName, tRotation
   put the long ID of grc item 1 of pParms into tObjectName
   put item 2 of pParms into tRotation
   revRotatePoly tObjectName, tRotation
end idRotate
Walt Brown
Omnis traductor traditor

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”