>on setBlockOff varName, spriteNo
>  global Blocks
>
>  set the member of sprite spriteNo to member("Off")
>  -- Blocks.setaProp(varName, 0) -- false
>  -- setaProp Blocks, varName, 0 -- false
>  Blocks[varName] = 0 -- false
>  updateStage
>end
>
>---
>
>as you can see I was playing with setBlockOff function to set the 
>value of the Blocks list, and when I see the data from the debugger, 
>it's actually changing the name of the property not the value of the 
>property...
>When the process is in the second repeat loop of the displayButtons 
>function, it invokes setBlockOff function and the value for the 
>Blocks list goes like this... If you see the first item, it is 
>written like "click00": 0 whereas the second item is written like 
>#click10: 0
>
>put Blocks
>-- ["click00": 0, #click10: 0, #click20: 0, #click30: 0, #click40: 
>0, #click50: 0, #click60: 0, #click70: 0, #click80: 0, #click90: 0, 
>#click01: 0, #click11: 0, #click21: 0, #click31: 0, #click41: 0, 
>#click51: 0, #click61: 0, #click71: 0, #click81: 0, #click91: 0, 
>#click02: 0, #click12: 0, #click22: 0, #click32: 0, #click42: 0, 
>#click52: 0, #click62: 0, #click72: 0, #click82: 0, #click92: 0, 
>#click03: 0, #click13: 0, #click23: 0, #click33: 0, #click43: 0, 
>#click53: 0, #click63: 0, #click73: 0, #click83: 0, #click93: 0, 
>#click04: 0, #click14: 0, #click24: 0, #click34: 0, #click44: 0, 
>#click54: 0, #click64: 0, #click74: 0, #click84: 0, #click94: 0]



This should work:

Blocks[varName] = 0 -- false

but you are confusing data types. You have defined your property list 
as containing only symbols (#click00) and then you try to change 
items in the list using a string ("click00")

set varName = Blocks.getPropAt(x) -- Try this
set varName = string(Blocks.getPropAt(x)) -- Instead of this

If you prefer verbose syntax to dot: try setProp instead of setAprop. 
The latter inserts a new property if there isn't already one with the 
same name.

-A.
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to