mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 11:41:05 +00:00
Change code to use new version of custom classes
This commit is contained in:
parent
b36ec0e29a
commit
2ce25e123d
2 changed files with 20 additions and 19 deletions
|
@ -1,3 +1,8 @@
|
|||
2022-03-29 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Plugins/Xib/GormXibWrapperLoader.m: Use new version
|
||||
of custom class dictionary.
|
||||
|
||||
2022-03-26 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* GormCore/GormClassEditor.m: Add coercion to (id) to silence
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <Foundation/Foundation.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
#include <GNUstepGUI/GSXibKeyedUnarchiver.h>
|
||||
#include <GormCore/GormCore.h>
|
||||
|
||||
#include "GormXibWrapperLoader.h"
|
||||
|
@ -37,11 +38,13 @@
|
|||
/*
|
||||
* This allows us to retrieve the customClasses from the XIB unarchiver.
|
||||
*/
|
||||
|
||||
@interface NSKeyedUnarchiver (Private)
|
||||
- (NSArray *) customClasses;
|
||||
- (NSDictionary *) customClasses;
|
||||
- (NSDictionary *) decoded;
|
||||
@end
|
||||
|
||||
|
||||
/*
|
||||
* Xib loader...
|
||||
*/
|
||||
|
@ -243,19 +246,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Add custom classes...
|
||||
//
|
||||
NSArray *customClasses = [u customClasses];
|
||||
NSEnumerator *en = [customClasses objectEnumerator];
|
||||
NSDictionary *customClassDict = nil;
|
||||
/*
|
||||
* Add custom classes...
|
||||
*/
|
||||
NSDictionary *customClasses = [u customClasses];
|
||||
NSEnumerator *en = [customClasses keyEnumerator];
|
||||
NSString *customClassName = nil;
|
||||
NSDictionary *decoded = [u decoded];
|
||||
|
||||
NSDebugLog(@"customClasses = %@", customClasses);
|
||||
while ((customClassDict = [en nextObject]) != nil)
|
||||
while ((customClassName = [en nextObject]) != nil)
|
||||
{
|
||||
NSDictionary *customClassDict = [customClasses objectForKey: customClassName];;
|
||||
NSString *theId = [customClassDict objectForKey: @"id"];
|
||||
NSString *customClassName = [customClassDict objectForKey: @"customClassName"];
|
||||
NSString *parentClassName = [customClassDict objectForKey: @"parentClassName"];
|
||||
id realObject = [decoded objectForKey: theId];
|
||||
NSString *theName = nil;
|
||||
|
@ -292,9 +295,9 @@
|
|||
forName: theName];
|
||||
}
|
||||
|
||||
//
|
||||
// add connections...
|
||||
//
|
||||
/*
|
||||
* add connections...
|
||||
*/
|
||||
en = [container connectionRecordEnumerator];
|
||||
while ((cr = [en nextObject]) != nil)
|
||||
{
|
||||
|
@ -334,13 +337,6 @@
|
|||
[classManager addAction: [o label]
|
||||
forObject: src];
|
||||
|
||||
// If the src is the first responder, use nil since this
|
||||
// tells AppKit to use the First Responder chain.
|
||||
//if (src == [doc firstResponder])
|
||||
// {
|
||||
// src = nil;
|
||||
// }
|
||||
|
||||
// For control connectors these roles are reversed...
|
||||
[o setSource: dest];
|
||||
[o setDestination: src];
|
||||
|
|
Loading…
Reference in a new issue