From 73ae953c78663df2b0bb0839b6a48c05c7312324 Mon Sep 17 00:00:00 2001 From: stoyan Date: Mon, 12 Jan 2004 20:58:30 +0000 Subject: [PATCH] Use isKindOfClass: instead of class named comparison git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18396 72102866-910b-0410-8b05-ffd578937521 --- Source/GSTitleView.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/GSTitleView.m b/Source/GSTitleView.m index d702dc061..f26ff7381 100644 --- a/Source/GSTitleView.m +++ b/Source/GSTitleView.m @@ -364,8 +364,7 @@ { NSNotificationCenter *theCenter = [NSNotificationCenter defaultCenter]; - if ([owner class] == [NSWindow class] - || [owner class] == [NSPanel class]) + if ([owner isKindOfClass:[NSWindow class]]) { NSDebugLLog(@"GSTitleView", @"owner is NSWindow or NSPanel"); _owner = owner; @@ -389,7 +388,7 @@ name: NSWindowDidResignKeyNotification object: _owner]; } - else if ([owner respondsToSelector:@selector(menuRepresentation)]) + else if ([owner isKindOfClass:[NSMenu class]]) { NSDebugLLog(@"GSTitleView", @"owner is NSMenu"); _owner = owner;