Revision: 5013
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5013&view=rev
Author:   hofman
Date:     2008-11-30 13:20:44 +0000 (Sun, 30 Nov 2008)

Log Message:
-----------
ad template accessor to get first object in array

Modified Paths:
--------------
    trunk/NSArray_SKExtensions.m

Modified: trunk/NSArray_SKExtensions.m
===================================================================
--- trunk/NSArray_SKExtensions.m        2008-11-30 13:16:56 UTC (rev 5012)
+++ trunk/NSArray_SKExtensions.m        2008-11-30 13:20:44 UTC (rev 5013)
@@ -45,6 +45,10 @@
 
 #pragma mark Templating support
 
+- (id)firstObject {
+    return [self count] ? [self objectAtIndex:0] : nil;
+}
+
 - (NSArray *)arraySortedByPageIndex {
     return [self sortedArrayUsingDescriptors:[NSArray 
arrayWithObject:[[[NSSortDescriptor alloc] 
initWithKey:SKNPDFAnnotationPageIndexKey ascending:YES 
selector:@selector(compare:)] autorelease]]];
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to