Re: [Gambas-user] How to stop an Observer?

2011-07-11 Thread tobias
i also considered using Object.Lock() this works with the textbox but not with an observer...? -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of applicat

Re: [Gambas-user] How to stop an Observer?

2011-07-11 Thread Benoît Minisini
> > > > 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).

Re: [Gambas-user] How to stop an Observer?

2011-07-11 Thread tobias
of course, i could also use a flag instead, but i love it to research in the gambas universe :) -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of applica

Re: [Gambas-user] How to stop an Observer?

2011-07-11 Thread tobias
On 11.07.2011 22:39, Benoît Minisini wrote: >> On 11.07.2011 20:47, tobias wrote: >>> hi, >>> >>> i wonder how to stop an observer from raising events? my code >>> demonstrative code looks like this: >>> >>> (gambas2) >>> >>> PRIVATE hObs AS Observer >>> >>> PUBLIC SUB ObserveSubject(hSubject AS Te

Re: [Gambas-user] How to stop an Observer?

2011-07-11 Thread Benoît Minisini
> On 11.07.2011 20:47, tobias wrote: > > hi, > > > > i wonder how to stop an observer from raising events? my code > > demonstrative code looks like this: > > > > (gambas2) > > > > PRIVATE hObs AS Observer > > > > PUBLIC SUB ObserveSubject(hSubject AS TextBox) > > > > IF hObs THEN > >

Re: [Gambas-user] How to stop an Observer?

2011-07-11 Thread tobias
On 11.07.2011 20:47, tobias wrote: > hi, > > i wonder how to stop an observer from raising events? my code > demonstrative code looks like this: > > (gambas2) > > PRIVATE hObs AS Observer > > PUBLIC SUB ObserveSubject(hSubject AS TextBox) > IF hObs THEN > ReleaseSubject() > ENDIF >

[Gambas-user] How to stop an Observer?

2011-07-11 Thread tobias
hi, i wonder how to stop an observer from raising events? my code demonstrative code looks like this: (gambas2) PRIVATE hObs AS Observer PUBLIC SUB ObserveSubject(hSubject AS TextBox) IF hObs THEN ReleaseSubject() ENDIF hObs = NEW Observer(hSubject) END PUBLIC SUB ReleaseSubject