[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[703] trunk/fuse
Brought to you by:
fredm
From: <fr...@us...> - 2012-11-02 12:39:33
|
Revision: 703 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=703&view=rev Author: fredm Date: 2012-11-02 12:39:26 +0000 (Fri, 02 Nov 2012) Log Message: ----------- Hmm, various modernising refactorings broke the build, roll them back. Modified Paths: -------------- trunk/fuse/fusepb/controllers/DebuggerController.m trunk/fuse/fusepb/controllers/FuseController.m trunk/fuse/fusepb/controllers/MemoryBrowserController.m trunk/fuse/fusepb/controllers/PokeFinderController.m trunk/fuse/fusepb/controllers/PreferencesController.m trunk/fuse/fusepb/controllers/RollbackController.m trunk/fuse/fusepb/models/Emulator.m trunk/fuse/fusepb/views/DisplayOpenGLView.m trunk/fuse/settings.pl Modified: trunk/fuse/fusepb/controllers/DebuggerController.m =================================================================== --- trunk/fuse/fusepb/controllers/DebuggerController.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/controllers/DebuggerController.m 2012-11-02 12:39:26 UTC (rev 703) @@ -130,7 +130,7 @@ if( row < 0 || row >= [eventsContents count] ) return; - record = eventsContents[row]; + record = [eventsContents objectAtIndex:row]; value = [record valueForKey:@"time"]; error = debugger_breakpoint_add_time( DEBUGGER_BREAKPOINT_TYPE_TIME, @@ -525,31 +525,31 @@ switch( [table tag] ) { case 0: if(row < 0 || row > [dissasemblyContents count]) return nil; - record = dissasemblyContents[row]; + record = [dissasemblyContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; break; case 1: if(row < 0 || row > [stackContents count]) return nil; - record = stackContents[row]; + record = [stackContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; break; case 2: if(row < 0 || row > [breakpointsContents count]) return nil; - record = breakpointsContents[row]; + record = [breakpointsContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; break; case 3: if(row < 0 || row > [eventsContents count]) return nil; - record = eventsContents[row]; + record = [eventsContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; break; case 4: if(row < 0 || row > [memoryMapContents count]) return nil; - record = memoryMapContents[row]; + record = [memoryMapContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; break; Modified: trunk/fuse/fusepb/controllers/FuseController.m =================================================================== --- trunk/fuse/fusepb/controllers/FuseController.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/controllers/FuseController.m 2012-11-02 12:39:26 UTC (rev 703) @@ -1797,7 +1797,8 @@ - (void)openRecent:(id)fileMenu { - NSString *file = settings_current.cocoa->recent_snapshots[[recentSnaps indexOfItem:fileMenu]]; + NSString *file = [settings_current.cocoa->recent_snapshots + objectAtIndex:[recentSnaps indexOfItem:fileMenu]]; char *filename = strdup([file UTF8String]); if( filename == NULL ) return; @@ -1828,7 +1829,8 @@ } NSMutableString *commonPrefix = [NSMutableString - stringWithString:settings_current.cocoa->recent_snapshots[[[matches lastObject][1] intValue]]]; + stringWithString:[settings_current.cocoa->recent_snapshots + objectAtIndex:[[[matches lastObject] objectAtIndex:1] intValue]]]; /* Iterate through matches to find shortest common string as found by commonPrefixWithString */ @@ -1837,12 +1839,14 @@ /* Compare all strings with commonPrefixWithString and find the shortest prefix */ id object2; - NSString *file = settings_current.cocoa->recent_snapshots[[object[1] intValue]]; + NSString *file = [settings_current.cocoa->recent_snapshots + objectAtIndex:[[object objectAtIndex:1] intValue]]; NSEnumerator *enumerator2 = [matches objectEnumerator]; while( (object2 = [enumerator2 nextObject]) ) { if([object isEqual:object2]) continue; - NSString *file2 = settings_current.cocoa->recent_snapshots[[object2[0] intValue]]; + NSString *file2 = [settings_current.cocoa->recent_snapshots + objectAtIndex:[[object2 objectAtIndex:0] intValue]]; NSString *prefix = [file commonPrefixWithString:file2 options:NSLiteralSearch]; if( [prefix length] < [commonPrefix length] ) { @@ -1856,9 +1860,9 @@ the full path with commonPrefix removed, and with snap name - .../ prepended */ for( object in matches ) { - unsigned index = [object[0] intValue]; - NSString *file = settings_current.cocoa->recent_snapshots[[object[0] intValue]]; - + unsigned index = [[object objectAtIndex:0] intValue]; + NSString *file = [settings_current.cocoa->recent_snapshots + objectAtIndex:[[object objectAtIndex:0] intValue]]; NSMutableString *label = [NSMutableString stringWithString:file]; [label replaceCharactersInRange:range withString:@" - .../"]; @@ -2470,7 +2474,7 @@ result = [oPanel runModal]; if (result == NSOKButton) { NSArray *filesToOpen = [oPanel URLs]; - NSString *aFile = [filesToOpen[0] path]; + NSString *aFile = [[filesToOpen objectAtIndex:0] path]; [aFile getFileSystemRepresentation:buffer maxLength:PATH_MAX]; filename = strdup ( buffer ); } @@ -2488,7 +2492,7 @@ sPanel = [NSSavePanel savePanel]; [sPanel setTitle:title]; - [sPanel setAllowedFileTypes:@[fileTypes[0]]]; + [sPanel setAllowedFileTypes:[NSArray arrayWithObject:[fileTypes objectAtIndex:0]]]; [sPanel setCanSelectHiddenExtension:YES]; if( [fileTypes count] > 1 ) { Modified: trunk/fuse/fusepb/controllers/MemoryBrowserController.m =================================================================== --- trunk/fuse/fusepb/controllers/MemoryBrowserController.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/controllers/MemoryBrowserController.m 2012-11-02 12:39:26 UTC (rev 703) @@ -121,7 +121,7 @@ id record, value; NSParameterAssert(row >= 0 && row < [tableContents count]); - record = tableContents[row]; + record = [tableContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; } Modified: trunk/fuse/fusepb/controllers/PokeFinderController.m =================================================================== --- trunk/fuse/fusepb/controllers/PokeFinderController.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/controllers/PokeFinderController.m 2012-11-02 12:39:26 UTC (rev 703) @@ -80,7 +80,7 @@ if( row < 0 || row >= [tableContents count] ) return; - record = tableContents[row]; + record = [tableContents objectAtIndex:row]; value = [record valueForKey:@"page"]; page = [value unsignedLongValue]; value = [record valueForKey:@"offset_number"]; @@ -169,7 +169,7 @@ id record, value; if( row < 0 || row >= [tableContents count] ) return nil; - record = tableContents[row]; + record = [tableContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; } Modified: trunk/fuse/fusepb/controllers/PreferencesController.m =================================================================== --- trunk/fuse/fusepb/controllers/PreferencesController.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/controllers/PreferencesController.m 2012-11-02 12:39:26 UTC (rev 703) @@ -117,7 +117,7 @@ - (void)awakeFromNib { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSToolbarItem *item = [toolbar items][[defaults integerForKey:@"preferencestab"]]; + NSToolbarItem *item = [[toolbar items] objectAtIndex:[defaults integerForKey:@"preferencestab"]]; [toolbar setSelectedItemIdentifier:[item itemIdentifier]]; [self selectPrefPanel:item]; } @@ -326,7 +326,7 @@ newMachineRoms = settings_set_rom_array( &settings_current ); for( i=0; i<[newMachineRoms count]; i++ ) { - [self replaceObjectInMachineRomsAtIndex:i withObject:newMachineRoms[i]]; + [self replaceObjectInMachineRomsAtIndex:i withObject:[newMachineRoms objectAtIndex:i]]; } } @@ -540,7 +540,7 @@ - (id)objectInMachineRomsAtIndex:(unsigned int)index { - return machineRoms[index]; + return [machineRoms objectAtIndex:index]; } - (void)insertObject:(id)anObject inMachineRomsAtIndex:(unsigned int)index @@ -555,7 +555,7 @@ - (void)replaceObjectInMachineRomsAtIndex:(unsigned int)index withObject:(id)anObject { - machineRoms[index] = anObject; + [machineRoms replaceObjectAtIndex:index withObject:anObject]; } @end Modified: trunk/fuse/fusepb/controllers/RollbackController.m =================================================================== --- trunk/fuse/fusepb/controllers/RollbackController.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/controllers/RollbackController.m 2012-11-02 12:39:26 UTC (rev 703) @@ -121,7 +121,7 @@ id record, value; NSParameterAssert(row >= 0 && row < [tableContents count]); - record = tableContents[row]; + record = [tableContents objectAtIndex:row]; value = [record valueForKey:[col identifier]]; return value; } Modified: trunk/fuse/fusepb/models/Emulator.m =================================================================== --- trunk/fuse/fusepb/models/Emulator.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/models/Emulator.m 2012-11-02 12:39:26 UTC (rev 703) @@ -76,8 +76,8 @@ pool = [[NSAutoreleasePool alloc] init]; serverConnection = [NSConnection - connectionWithReceivePort:portArray[0] - sendPort:portArray[1]]; + connectionWithReceivePort:[portArray objectAtIndex:0] + sendPort:[portArray objectAtIndex:1]]; [serverConnection setRootObject:self]; proxy_view = (id)[serverConnection rootProxy]; [proxy_view setServer:self]; Modified: trunk/fuse/fusepb/views/DisplayOpenGLView.m =================================================================== --- trunk/fuse/fusepb/views/DisplayOpenGLView.m 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/fusepb/views/DisplayOpenGLView.m 2012-11-02 12:39:26 UTC (rev 703) @@ -1412,8 +1412,8 @@ -(void) windowChangedScreen:(NSNotification*)inNotification { NSWindow *window = [self window]; - CGDirectDisplayID displayID = (CGDirectDisplayID)[[[window screen] - deviceDescription][@"NSScreenNumber"] intValue]; + CGDirectDisplayID displayID = (CGDirectDisplayID)[[[[window screen] + deviceDescription] objectForKey:@"NSScreenNumber"] intValue]; if((displayID != 0) && (mainViewDisplayID != displayID)) { CVDisplayLinkSetCurrentCGDisplay(displayLink, displayID); Modified: trunk/fuse/settings.pl =================================================================== --- trunk/fuse/settings.pl 2012-11-02 12:03:41 UTC (rev 702) +++ trunk/fuse/settings.pl 2012-11-02 12:39:26 UTC (rev 703) @@ -161,25 +161,25 @@ if( $type eq 'boolean' ) { print << "CODE"; value = settings->$name ? YES : NO; - defaultValues[@"$options{$name}->{configfile}"] = @(value); + [defaultValues setObject:@(value) forKey:@"$options{$name}->{configfile}"]; CODE } elsif( $type eq 'string' ) { print << "CODE"; if( settings->$name ) - defaultValues[@"$options{$name}->{configfile}"] = @(settings->$name); + [defaultValues setObject:@(settings->$name) forKey:@"$options{$name}->{configfile}"]; else - defaultValues[@"$options{$name}->{configfile}"] = @""; + [defaultValues setObject:@"" forKey:@"$options{$name}->{configfile}"]; CODE } elsif( $type eq 'numeric' ) { print << "CODE"; - defaultValues[@"$options{$name}->{configfile}"] = @(settings->$name); + [defaultValues setObject:@(settings->$name) forKey:@"$options{$name}->{configfile}"]; CODE } elsif( $type eq 'nsarray' ) { print << "CODE"; if( settings->cocoa && settings->cocoa->$name ) - defaultValues[@"$options{$name}->{configfile}"] = settings->cocoa->$name; + [defaultValues setObject:settings->cocoa->$name forKey:@"$options{$name}->{configfile}"]; else - defaultValues[@"$options{$name}->{configfile}"] = @[]; + [defaultValues setObject:[NSArray array] forKey:@"$options{$name}->{configfile}"]; CODE } elsif( $type eq 'nsdictionary' ) { # Do nothing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |