[Gambas-user] How to stop an Observer?
gambas at ...1...
Mon Jul 11 22:58:37 CEST 2011
> > Why do you want to stop the observer?
> as usual, i'm just interested ;)
> in my example, the raising of observer events may become unnecessary or
> unwelcome because they restrict a control (i wanted to try another way
> of limiting the input of a textbox to number only, for example).
> now, i'm discovering
> FOR EACH s IN Class.Load("TextBox").Symbols
> to copy the entire textbox before deleting it to get rid of the events :)
An observer is a Gambas object. So if you want him to stop raising events,
just use Object.Detach() on it.
More information about the User