I have just had a hard disk problem so a new Windows 10 setup of LC 9-rc1 is being used, no older editions clogging things up.
Several things are making it hard to get to grips with again, I thought I had made great steps with the previous task of interfacing with foreign dll handlers for the Velleman experiment board, but so much of the basics is tripping me up here.
Firstly when testing, making any changes is not necessarily being reflected in the test, for instance, if I set
Code: Select all
metadata preferredSize is "300,300"
Mainly though my thoughts are concerned with how to evaluate variables right now.
In the clock .lcb the updateGeometry() handler contains
Code: Select all
put [my width / 2, my height / 2] into mCentre
Code: Select all
put [my width / 2, my height / 2] into mCentre
put [(my width / 2) + 30, (my height / 2) + 30] into mNewVar -- fails
put [my width / 2, my height / 2] into mNewVar -- fails, even though a literal cut and paste of the valid line but with mCentre edited to mNewVar
put mCentre into mNewVar -- fails (sure beats me why)
/* this fails
variable tX as Number
variable tY as Number
put mCentre[1] into tX
put mCentre[2] into tY
add 90 to tX
add 90 to tY
put the empty list into mNewVar
push tY onto mNewVar
push tX onto mNewVar
*/
/* this fails
put the empty list into mNewVar
push mCentre[2] onto mNewVar
push mCentre[1] onto mNewVar
*/
put [90,90] into mNewVar -- works to put the hard coded values into the variable