Revision: 7835
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7835&view=rev
Author:   amaxwell
Date:     2012-12-10 18:27:46 +0000 (Mon, 10 Dec 2012)
Log Message:
-----------
Fix Xcode 4 type warnings.  Multiple ways to do this, and I am not entirely 
happy with any of them.

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

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2012-12-10 18:27:44 UTC (rev 7834)
+++ trunk/SKMainWindowController_UI.m   2012-12-10 18:27:46 UTC (rev 7835)
@@ -605,6 +605,7 @@
         }
     } else if ([ov isEqual:rightSideController.noteOutlineView]) {
         NSString *tcID = [tableColumn  identifier];
+        PDFAnnotation *item = item;
         if (tableColumn == nil)
             return [item text];
         else if ([tcID isEqualToString:NOTE_COLUMNID])
@@ -623,7 +624,7 @@
     return nil;
 }
 
-- (void)outlineView:(NSOutlineView *)ov setObjectValue:(id)object 
forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item{
+- (void)outlineView:(NSOutlineView *)ov setObjectValue:(id)object 
forTableColumn:(NSTableColumn *)tableColumn byItem:(PDFAnnotation *)item{
     if ([ov isEqual:rightSideController.noteOutlineView] && [item type]) {
         if ([[tableColumn identifier] isEqualToString:NOTE_COLUMNID]) {
             if ([(object ?: @"") isEqualToString:([item string] ?: @"")] == NO)
@@ -635,7 +636,7 @@
     }
 }
 
-- (NSDragOperation)outlineView:(NSOutlineView *)ov validateDrop:(id 
<NSDraggingInfo>)info proposedItem:(id)item 
proposedChildIndex:(NSInteger)anIndex {
+- (NSDragOperation)outlineView:(NSOutlineView *)ov validateDrop:(id 
<NSDraggingInfo>)info proposedItem:(PDFAnnotation *)item 
proposedChildIndex:(NSInteger)anIndex {
     NSDragOperation dragOp = NSDragOperationNone;
     if ([ov isEqual:rightSideController.noteOutlineView]) {
         NSPasteboard *pboard = [info draggingPasteboard];
@@ -664,7 +665,7 @@
 
 #pragma mark NSOutlineView delegate protocol
 
-- (NSCell *)outlineView:(NSOutlineView *)ov 
dataCellForTableColumn:(NSTableColumn *)tableColumn item:(id)item {
+- (NSCell *)outlineView:(NSOutlineView *)ov 
dataCellForTableColumn:(NSTableColumn *)tableColumn item:(PDFAnnotation *)item {
     if ([ov isEqual:rightSideController.noteOutlineView] && tableColumn == nil 
&& [item type] == nil) {
         return [[ov tableColumnWithIdentifier:NOTE_COLUMNID] 
dataCellForRow:[ov rowForItem:item]];
     }
@@ -762,7 +763,7 @@
     }
 }
 
-- (CGFloat)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item {
+- (CGFloat)outlineView:(NSOutlineView *)ov heightOfRowByItem:(PDFAnnotation 
*)item {
     if ([ov isEqual:rightSideController.noteOutlineView]) {
         CGFloat rowHeight = [rowHeights floatForKey:item];
         return (rowHeight > 0.0 ? rowHeight : ([item type] ? [ov rowHeight] + 
2.0 : 85.0));
@@ -824,7 +825,7 @@
         for (item in items) {
             if ([attrString length])
                 [attrString replaceCharactersInRange:NSMakeRange([attrString 
length], 0) withString:@"\n\n"];
-            if ([item type]) {
+            if ([(PDFAnnotation *)item type]) {
                 [attrString replaceCharactersInRange:NSMakeRange([attrString 
length], 0) withString:[item string]];
             } else {
                 [attrString appendAttributedString:[(SKNoteText *)item text]];
@@ -1014,7 +1015,7 @@
     }
     
     for (id item in items) {
-        if ([item type]) {
+        if ([(PDFAnnotation *)item type]) {
             [cell setObjectValue:[item string]];
             height = [cell cellSizeForBounds:rect].height;
         } else {
@@ -1082,7 +1083,7 @@
             if ([pdfView hideNotes] == NO && [items count] == 1) {
                 PDFAnnotation *annotation = [[self noteItems:items] 
lastObject];
                 if ([annotation isEditable]) {
-                    if ([[items lastObject] type] == nil) {
+                    if ([(PDFAnnotation *)[items lastObject] type] == nil) {
                         item = [menu 
addItemWithTitle:[NSLocalizedString(@"Edit", @"Menu item title") 
stringByAppendingEllipsis] action:@selector(editNoteTextFromTable:) 
target:self];
                         [item setRepresentedObject:annotation];
                     } else if ([[rightSideController.noteOutlineView 
tableColumnWithIdentifier:NOTE_COLUMNID] isHidden]) {
@@ -1537,7 +1538,7 @@
         [menuItem setState:mwcFlags.rightSidePaneState == 
(SKRightSidePaneState)[menuItem tag] ? NSOnState : NSOffState];
         return [self interactionMode] != SKPresentationMode;
     } else if (action == @selector(toggleSplitPDF:)) {
-        if ([secondaryPdfView window])
+        if ([(NSView *)secondaryPdfView window])
             [menuItem setTitle:NSLocalizedString(@"Hide Split PDF", @"Menu 
item title")];
         else
             [menuItem setTitle:NSLocalizedString(@"Show Split PDF", @"Menu 
item title")];

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


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to