Revision: 4514
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4514&view=rev
Author:   hofman
Date:     2008-09-01 19:03:08 +0000 (Mon, 01 Sep 2008)

Log Message:
-----------
Return copy from accessor to avoid returning an object that may be modified.

Modified Paths:
--------------
    trunk/SKNotesDocument.h
    trunk/SKNotesDocument.m

Modified: trunk/SKNotesDocument.h
===================================================================
--- trunk/SKNotesDocument.h     2008-09-01 18:58:03 UTC (rev 4513)
+++ trunk/SKNotesDocument.h     2008-09-01 19:03:08 UTC (rev 4514)
@@ -51,7 +51,6 @@
 - (IBAction)openPDF:(id)sender;
 
 - (NSArray *)notes;
-- (void)setNotes:(NSArray *)newNotes;
 - (unsigned int)countOfNotes;
 - (NSDictionary *)objectInNotesAtIndex:(unsigned int)index;
 - (void)insertObject:(NSDictionary *)note inNotesAtIndex:(unsigned int)index;

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2008-09-01 18:58:03 UTC (rev 4513)
+++ trunk/SKNotesDocument.m     2008-09-01 19:03:08 UTC (rev 4514)
@@ -335,13 +335,9 @@
 #pragma mark Accessors
 
 - (NSArray *)notes {
-    return notes;
+    return [[notes copy] autorelease];
 }
 
-- (void)setNotes:(NSArray *)newNotes {
-    [notes setArray:notes];
-}
-
 - (unsigned int)countOfNotes {
     return [notes count];
 }


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