Add code to properly load the bindings inspector into the container view. Also implement the content bindings inspector

This commit is contained in:
Gregory John Casamento 2023-01-18 11:29:40 -05:00
parent ed2115d176
commit 5e5ddc0b74
10 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,16 @@
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
GormBindingsContentInspector = {
Actions = (
);
Outlets = (
"_bindTo",
"_controllerKey",
"_modelKeyPath",
"_raisesForNotApplicable",
"_valueTransformer",
"_controllerPopUp"
);
Super = IBInspector;
};
}

View file

@ -154,6 +154,7 @@ Gorm_RESOURCE_FILES = \
Gorm_LOCALIZED_RESOURCE_FILES = \
GormBindingsInspector.gorm \
GormBindingsContentInspector.gorm \
GormClassEditor.gorm \
GormClassInspector.gorm \
GormClassPanel.gorm \

View file

@ -40,6 +40,7 @@ include ../Version
GormCore_HEADER_FILES = \
GormBindingsInspector.h \
GormBindingsContentInspector.h \
GormBoxEditor.h \
GormCore.h \
GormClassEditor.h \
@ -108,6 +109,7 @@ GormCore_HEADER_FILES = \
GormCore_OBJC_FILES = \
GormBindingsInspector.m \
GormBindingsContentInspector.m \
GormBoxEditor.m \
GormClassEditor.m \
GormClassInspector.m \

View file

@ -0,0 +1,20 @@
/* All rights reserved */
#ifndef INCLUDED_GormBindingsContentInspector_H
#define INCLUDED_GormBindingsContentInspector_H
#import <InterfaceBuilder/IBInspector.h>
@interface GormBindingsContentInspector : IBInspector
{
IBOutlet id _bindTo;
IBOutlet id _controllerKey;
IBOutlet id _modelKeyPath;
IBOutlet id _raisesForNotApplicable;
IBOutlet id _valueTransformer;
IBOutlet id _controllerPopUp;
}
@end
#endif // INCLUDED_GormBindingsContentInspector_H

View file

@ -0,0 +1,17 @@
/* All rights reserved */
#import "GormBindingsContentInspector.h"
@implementation GormBindingsContentInspector
- (IBAction) ok: (id)sender
{
[super ok: sender];
}
- (IBAction) revert: (id)sender
{
[super revert: sender];
}
@end

View file

@ -97,7 +97,10 @@
if (![NSBundle loadNibNamed: inspectorName owner: _inspectorObject])
{
NSLog(@"Could not load inspector for binding %@", inspectorName);
return;
}
[_containerView setContentView: [[_inspectorObject window] contentView]];
}
else
{

View file

@ -1797,6 +1797,10 @@
// header file comments...
[headerFile appendString: @"/* All rights reserved */\n\n"];
[headerFile appendString: [NSString stringWithFormat: @"#ifndef INCLUDED_%@_H", className]];
[headerFile appendString: [NSString stringWithFormat: @"#define INCLUDED_%@_H", className]];
[sourceFile appendString: @"/* All rights reserved */\n\n"];
[headerFile appendString: @"#import <AppKit/AppKit.h>\n\n"];
[sourceFile appendString: @"#import <AppKit/AppKit.h>\n"];
@ -1838,6 +1842,8 @@
[headerFile appendFormat: @"\n@end\n"];
[sourceFile appendFormat: @"@end\n"];
[headerFile appendString: [NSString stringWithFormat: @"#endif // INCLUDED_%@_H", className]];
headerData = [headerFile dataUsingEncoding:
[NSString defaultCStringEncoding]];
sourceData = [sourceFile dataUsingEncoding: