Sep24th

mouseUp never called

by  connor

Kód:

- (void) mouseDown:(NSEvent)event
{
   [super mouseDown:event];
   ....
}

Hibajelenség:

– mouseUp nem fut.

Oka:

> Probably the superclass will setup a local event loop in mouseDown. I
> think several of the view classes do this.

That is exactly what’s going on. If you want to implement -mouseDown:
and -mouseUp:, don’t call [super mouseDown:].

This is one of those things that should probably be fixed, but fixing
it would break too many existing apps..

Megoldás:
super-t nem hívjuk meg. Dzsízüsz…

Továbbá, ha NSButton-t subclass-olsz és ezekkel bűvészkedsz, a target-en a selectort neked kell meghívni mouse up esetén.

 

No Comments

There aren't any comments yet. Be the first!

Leave a Reply

Your email address will not be published. Required fields are marked *