[Gambas-user] Control Groups-bug?
ron
ronstk at ...239...
Thu Apr 1 20:10:21 CEST 2004
On Thursday 01 April 2004 19:54, Sebastian Jauch wrote:
> hello,
>
> >By trying your code, I get a "stack overflow" error, not a crash. Which
> >version of gambas do you use ?
>
> 0.91 compiled from sources on a mandrake 10,
> so "stack overflow" helps me a lot...
>
> if so i will only change the value if it is different,
> like
>
> > IF NOT cbMultiple.Value THEN
bDoNix=TRUE
> > FOR i=0 TO $cbAnswers.Length-1
> > cbTemp=$cbAnswers[i]
> > cbTemp.Value=FALSE
> > NEXT
> > cbTemp=LAST
> > if not cbtemp.value then cbTemp.Value=TRUE
bDoNix=FALSE
> > END IF
>
> i will take a look why it doesn't report that correct on my system
>
> thanx
May be a better way
Set in your code for the FOR a flag i.e. bDoNix=True and at the
end bDoNix=False.
Add or In the Sub where the groupname_Change() is, add next line
IF bDoNix then RETURN or
IF bDoNix then STOP.EVENT
This prevent normal executing the service done if you are
setting the value from code.
Same occurs in several other widgets that the _Change or _Click
is fired when you add Items to it. ComboBox.Add("Item1")
You can use the widget.Tag to store the flag in that case.
Ron
More information about the User
mailing list