i have simple application has nssearchfield
, want know if user presses, example, arrow key. don't want subclass, because want modify values of iboutlets in aplication, , can't in subclass.
edit
the keyup:
method override in nssearchfield
subclass is:
-(void)keyup:(nsevent*)event { if ([event keycode]==36){ customers* c= [[customers alloc] init];//customers class have iboulets , methods [[self window] selectkeyviewfollowingview:self];// change first responder [c searcht:[self stringvalue]];//here want call method make query , change stringvalues of iboulets } }
assign controller delegate of searchfield , implement method:
- (bool)control:(nscontrol *)control textview:(nstextview *)textview docommandbyselector:(sel)command
you should able receive simple nsresponder selectors such movedown:, moveup:, moveleft:, moveright: correspond arrow keys.
Comments
Post a Comment