romi.hofmann.7 0 Newbie Poster

I have a NSView subclass TimeCircle which is the controller of my custom view.
In TimeCircle there are several drawings taking place depending on the state of button butStart which is toogle type. The button is connected correctly to TimeCircle.

I have the problem that I can´t get [butStart state] reliably because the method in question is always called twice. See logging output below. Notice, that the two lines containing btnTitleText come from the same code.

Log Output
btnTitleText: (null) btnStateFlag: 0
btnTitleText: Stop btnStateFlag: 1

In case where btnTitleText: (null) btnStateFlag: 0 is logged, which is wrong, the butStart address is 0x0000000000000000, butStart is undefined.

In the other case where btnTitleText: Stop btnStateFlag: 1 is logged, which is correct, the butStart address is 0x0000000101e180f0.

Any ideas?

For testing I removed subclass TimeCircle from the custom view. And Bingo, that one generated the erroneous output. But something else is still using TimeCircle, generates the correct output and I don´t see what and why. I tried also this NSLog(@"self = %p", self); but that only returns the address of self.

Greetings from Switzerland, Ronald Hofmann