Matt Neuburg wrote:
What's the purpose of this test? Is it necessary? Is it working? Try putting
an NSLog inside the test to see whether it is passing/failing when you think
it should be.

Thanks for the the response, Matt.

The "if ([[item identifier] isEqual:@"Search"])" is to avoid stealing key window status for any other pane beside the search pane. This is weird behavior I know, but since this is a palette-class input method, getting key status in most circumstances would break it. My palette window would end up sending Unicode input events to itself, not the host application. So I only want to be key when the user is entering text into the palette, and I force it to inactivate when editing ends or another tab is selected. Character Palette's behaves similarly with its search field.

Per your suggestion, I checked with an NSLog and the test is indeed working as designed.

Cheers,
-- Moses

>> Here is my tab switch delegate method:
>> -(void)tabView:(NSTabView*)tv
>> didSelectTabViewItem:(NSTabViewItem*)item
>> {
>>   NSLog(@"first responder WAS %@", [_window firstResponder]);
>>   if ([[item identifier] isEqual:@"Search"])
  {
    [_window makeKeyWindow];
    [_window makeFirstResponder:_searchText];
  }
  NSLog(@"first responder: %@", [_window firstResponder]);
}
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to