From 8309f24bee1364511d7f1d8b6b5954bdc592c58e Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Sat, 21 Jun 2003 03:21:33 +0000 Subject: [PATCH] Use NSFont not isa to call class methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16978 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSFont.m | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1027c52a4..74276acc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-20 Adam Fedor + + * Source/NSFont.m ([NSFont -initWithCoder:]): Use NSFont not isa + to call class methods. + 2003-06-20 Adam Fedor * Source/DocMakefile (after-all): Check if Gui exists before diff --git a/Source/NSFont.m b/Source/NSFont.m index a34285514..28bdd6833 100644 --- a/Source/NSFont.m +++ b/Source/NSFont.m @@ -1078,7 +1078,7 @@ static BOOL flip_hack; if (self) return self; - self = [isa userFontOfSize: fontMatrix[0]]; + self = [NSFont userFontOfSize: fontMatrix[0]]; NSAssert(self != nil, @"Couldn't find a valid font when decoding."); return self; } @@ -1101,41 +1101,41 @@ static BOOL flip_hack; switch (the_role >> 1) { case RoleBoldSystemFont: - new = [isa boldSystemFontOfSize: size]; + new = [NSFont boldSystemFontOfSize: size]; break; case RoleSystemFont: - new = [isa systemFontOfSize: size]; + new = [NSFont systemFontOfSize: size]; break; case RoleUserFixedPitchFont: - new = [isa userFixedPitchFontOfSize: size]; + new = [NSFont userFixedPitchFontOfSize: size]; break; case RoleTitleBarFont: - new = [isa titleBarFontOfSize: size]; + new = [NSFont titleBarFontOfSize: size]; break; case RoleMenuFont: - new = [isa menuFontOfSize: size]; + new = [NSFont menuFontOfSize: size]; break; case RoleMessageFont: - new = [isa messageFontOfSize: size]; + new = [NSFont messageFontOfSize: size]; break; case RolePaletteFont: - new = [isa paletteFontOfSize: size]; + new = [NSFont paletteFontOfSize: size]; break; case RoleToolTipsFont: - new = [isa toolTipsFontOfSize: size]; + new = [NSFont toolTipsFontOfSize: size]; break; case RoleControlContentFont: - new = [isa controlContentFontOfSize: size]; + new = [NSFont controlContentFontOfSize: size]; break; case RoleLabelFont: - new = [isa labelFontOfSize: size]; + new = [NSFont labelFontOfSize: size]; break; default: NSDebugLLog(@"NSFont", @"unknown role %i", the_role); /* fall through */ case RoleUserFont: - new = [isa userFontOfSize: size]; + new = [NSFont userFontOfSize: size]; break; } @@ -1143,7 +1143,7 @@ static BOOL flip_hack; if (new) return new; - new = [isa userFontOfSize: size]; + new = [NSFont userFontOfSize: size]; NSAssert(new != nil, @"Couldn't find a valid font when decoding."); return new; }