10-26-2006, 06:56 PM
I have this array I'm trying to setup but I can't figure out why it doesn't work unless I put a "-1" at the end of "w=wininfo.len-1". Why won't this work? "w=wininfo.len" If "len" is the number of "rows" then wouldn't wininfo[0 wininfo.len] work?
ClearOutput
int h=child(mouse)
if h=0
,end
int m w x y cx cy
GetWinXY win() x y cx cy
ARRAY(int)+ wininfo
if wininfo=0
,wininfo.create(3 1);;columns rows
,out "created"
for(w 0 wininfo.len)
,if wininfo[0 w]=h
,,wininfo[1 w]=cx
,,wininfo[2 w]=cy
,,out "replaced"
,,end
wininfo.redim(-1)
w=wininfo.len-1
wininfo[0 w]=h
wininfo[1 w]=cx
wininfo[2 w]=cy