Skip to content

Commit

Permalink
Make nib able to save again now that we know what was wrong with load…
Browse files Browse the repository at this point in the history
…ing and saving
  • Loading branch information
gcasa committed Apr 11, 2024
1 parent 76944c1 commit 83364fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Applications/Gorm/GormInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{
NSName = "GSNibFileType";
NSHumanReadableName = "Cocoa Nib";
NSRole = Viewer;
NSRole = Editor;
NSDocumentClass = GormDocument;
NSUnixExtensions = ( "nib" );
NSIcon = "GormNib.tiff";
Expand Down
8 changes: 7 additions & 1 deletion Plugins/Nib/GormNibWrapperLoader.m
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ - (BOOL) loadFileWrapper: (NSFileWrapper *)wrapper withDocument: (GormDocument *
{
continue;
}
//

//
// If it's NSApplication (most likely the File's Owner)
// skip it...
//
Expand Down Expand Up @@ -396,6 +397,11 @@ - (id) unarchiver: (NSKeyedUnarchiver *)unarchiver didDecodeObject: (id)obj
[obj setTarget: nil];
[obj setAction: NULL];
}
else if([obj isKindOfClass: [NSCustomObject class]])
{
GormObjectProxy *o = [[GormObjectProxy alloc] initWithClassName: [obj className]];
obj = o; // replace the object if it's an NSCustomObject...
}

return obj;
}
Expand Down

0 comments on commit 83364fb

Please sign in to comment.