From dde58ab673abae77bdfcda1eb95847c548767b0f Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 20 Jul 2005 11:13:44 +0000 Subject: [PATCH] improved -isNotEmpty git-svn-id: http://svn.opengroupware.org/SOPE/trunk@925 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/NGExtensions/ChangeLog | 5 +++++ .../NGExtensions/FdExt.subproj/NSNull+misc.m | 16 ++++++++++++++++ sope-core/NGExtensions/Version | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index 2bdef4af..c6023c56 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,8 @@ +2005-07-20 Helge Hess + + * FdExt.subproj/NSNull+misc.m: added -isNotEmpty for NSArray and + NSDictionary (return YES in case they have no elements) (v4.5.164) + 2005-07-19 Helge Hess * FdExt.subproj/NSString+misc.m: use -valueForKeyPath: instead of diff --git a/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m b/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m index 0b7867ba..a8ebf83d 100644 --- a/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m +++ b/sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m @@ -246,3 +246,19 @@ static inline BOOL doAbort(void) { } @end /* NSString(NSNullMisc) */ + +@implementation NSArray(NSNullMisc) + +- (BOOL)isNotEmpty { + return [self count] == 0 ? YES : NO; +} + +@end /* NSArray(NSNullMisc) */ + +@implementation NSDictionary(NSNullMisc) + +- (BOOL)isNotEmpty { + return [self count] == 0 ? YES : NO; +} + +@end /* NSDictionary(NSNullMisc) */ diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index 68ffe6c6..32992f7d 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,6 +1,6 @@ # version -SUBMINOR_VERSION:=163 +SUBMINOR_VERSION:=164 # v4.3.115 requires libFoundation v1.0.59 # v4.2.72 requires libEOControl v4.2.39 -- 2.39.5