Jens Alfke avatar Jens Alfke committed 5d437ba

Fixed 10.6 build errors. Tweaked DictObject.

Comments (0)

Files changed (5)

     Calling this will raise an exception if the object is immutable. */
 @property (readonly) NSMutableDictionary* mutableDictionary;
 
+@property (readonly) BOOL isMutable;
+
 /** Makes the object immutable from now on. 
     Any further attempt to set a property value will result in a runtime exception. */
 - (void) makeImmutable;
 }
 
 - (id) initMutableWithDictionary: (NSDictionary*)dict {
-    Assert(dict);
     self = [super init];
     if (self != nil) {
         _dict = dict ?[dict mutableCopy] :$mdict();
     return self;
 }
 
+- (id) init {
+    return [self initMutableWithDictionary:nil];
+}
+
 - (void) dealloc
 {
     [_dict release];
     return [[[self class] allocWithZone: zone] initMutableWithDictionary: _dict];
 }
 
-@synthesize dictionary=_dict;
+@synthesize dictionary=_dict, isMutable=_mutable;
 
 - (NSMutableDictionary*) mutableDictionary {
     Assert(_mutable, @"Attempt to access mutable dictionary of immutable instance %@", self);

MYAnimatingSplitView.h

 @end
 
 
-@interface NSObject (MYAnimatingSplitViewDelegate)
+@protocol MYAnimatingSplitViewDelegate <NSSplitViewDelegate>
 /** If the delegate implements this method, it will be called when the splitview
     begins and ends live resizing. */
 - (void)splitView: (NSSplitView*)splitView inLiveResize: (BOOL)inLiveResize;

UniqueWindowController.h

 #import <Cocoa/Cocoa.h>
 
 
-@interface UniqueWindowController : NSWindowController
+@interface UniqueWindowController : NSWindowController <NSWindowDelegate>
 
 + (UniqueWindowController*) instanceWith: (id)model;
 + (UniqueWindowController*) openWith: (id)model;

UniqueWindowController.m

 + (UniqueWindowController*) instanceWith: (id)model
 {
     for( NSWindow *window in OpenWindowsWithDelegateClass(self) ) {
-        UniqueWindowController *c = window.delegate;
+        UniqueWindowController *c = (id) window.delegate;
         if( [self isModel: c.model equalToModel: model] )
             return c;
     }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.