mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +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>
|
2022-03-26 Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* GormCore/GormClassEditor.m: Add coercion to (id) to silence
|
* GormCore/GormClassEditor.m: Add coercion to (id) to silence
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <Foundation/Foundation.h>
|
#include <Foundation/Foundation.h>
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
|
#include <GNUstepGUI/GSXibKeyedUnarchiver.h>
|
||||||
#include <GormCore/GormCore.h>
|
#include <GormCore/GormCore.h>
|
||||||
|
|
||||||
#include "GormXibWrapperLoader.h"
|
#include "GormXibWrapperLoader.h"
|
||||||
|
@ -37,11 +38,13 @@
|
||||||
/*
|
/*
|
||||||
* This allows us to retrieve the customClasses from the XIB unarchiver.
|
* This allows us to retrieve the customClasses from the XIB unarchiver.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@interface NSKeyedUnarchiver (Private)
|
@interface NSKeyedUnarchiver (Private)
|
||||||
- (NSArray *) customClasses;
|
- (NSDictionary *) customClasses;
|
||||||
- (NSDictionary *) decoded;
|
- (NSDictionary *) decoded;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Xib loader...
|
* Xib loader...
|
||||||
*/
|
*/
|
||||||
|
@ -243,19 +246,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/*
|
||||||
// Add custom classes...
|
* Add custom classes...
|
||||||
//
|
*/
|
||||||
NSArray *customClasses = [u customClasses];
|
NSDictionary *customClasses = [u customClasses];
|
||||||
NSEnumerator *en = [customClasses objectEnumerator];
|
NSEnumerator *en = [customClasses keyEnumerator];
|
||||||
NSDictionary *customClassDict = nil;
|
NSString *customClassName = nil;
|
||||||
NSDictionary *decoded = [u decoded];
|
NSDictionary *decoded = [u decoded];
|
||||||
|
|
||||||
NSDebugLog(@"customClasses = %@", customClasses);
|
NSDebugLog(@"customClasses = %@", customClasses);
|
||||||
while ((customClassDict = [en nextObject]) != nil)
|
while ((customClassName = [en nextObject]) != nil)
|
||||||
{
|
{
|
||||||
|
NSDictionary *customClassDict = [customClasses objectForKey: customClassName];;
|
||||||
NSString *theId = [customClassDict objectForKey: @"id"];
|
NSString *theId = [customClassDict objectForKey: @"id"];
|
||||||
NSString *customClassName = [customClassDict objectForKey: @"customClassName"];
|
|
||||||
NSString *parentClassName = [customClassDict objectForKey: @"parentClassName"];
|
NSString *parentClassName = [customClassDict objectForKey: @"parentClassName"];
|
||||||
id realObject = [decoded objectForKey: theId];
|
id realObject = [decoded objectForKey: theId];
|
||||||
NSString *theName = nil;
|
NSString *theName = nil;
|
||||||
|
@ -292,9 +295,9 @@
|
||||||
forName: theName];
|
forName: theName];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
/*
|
||||||
// add connections...
|
* add connections...
|
||||||
//
|
*/
|
||||||
en = [container connectionRecordEnumerator];
|
en = [container connectionRecordEnumerator];
|
||||||
while ((cr = [en nextObject]) != nil)
|
while ((cr = [en nextObject]) != nil)
|
||||||
{
|
{
|
||||||
|
@ -334,13 +337,6 @@
|
||||||
[classManager addAction: [o label]
|
[classManager addAction: [o label]
|
||||||
forObject: src];
|
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...
|
// For control connectors these roles are reversed...
|
||||||
[o setSource: dest];
|
[o setSource: dest];
|
||||||
[o setDestination: src];
|
[o setDestination: src];
|
||||||
|
|
Loading…
Reference in a new issue