[Gambas-user] Control Groups-bug?
Sebastian Jauch
sebastian.jauch at ...20...
Sun Mar 28 12:24:16 CEST 2004
Hello,
i found some strange behaviour when running through a control group, i sometimes want multiple items to be check or only one (depending on the state of cbMultiple.Value
now without the line "IF ($cbAnswers[i]=LAST) THEN CONTINUE"
gambas enters the debugger, shows a lot of weired variables
things like "swer.click" ...
adding the line "IF ($cbAnswers[i]=LAST) THEN CONTINUE" makes everything work fine
$cbAnswers is a global variable which contains all the checkboxes of group "cbAnswer", it seems that whenn i do $cbAnswers[i].Value=false
withe the LAST item the LAST variable gets horribly corrupted ??
items of $cbAnswers are initialized with:
tempObject=NEW checkbox(ME) AS "cbAnswer"
$cbAnswers.Add(tempObject)
is there some mistake in my code?
-------
code that crashes when clicking on a checkbox of group cbAnswer
PUBLIC SUB cbAnswer_Click()
DIM i AS Integer
DIM cbTemp AS Checkbox
IF NOT cbMultiple.Value THEN
FOR i=0 TO $cbAnswers.Length-1
cbTemp=$cbAnswers[i]
cbTemp.Value=FALSE
NEXT
cbTemp=LAST
cbTemp.Value=TRUE
END IF
END
-------------- next part --------------
A non-text attachment was scrubbed...
Name: controlGroupBug.tgz
Type: application/octet-stream
Size: 51298 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20040328/f271b1e7/attachment.obj>
More information about the User
mailing list