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 81260e4084
commit 94fff19d8b
9 changed files with 64 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

@ -42,6 +42,7 @@ GormCore_HEADER_FILES = \
GormCore.h \
GormAbstractDelegate.h \
GormBindingsInspector.h \
GormBindingsContentInspector.h \
GormBoxEditor.h \
GormCore.h \
GormClassEditor.h \
@ -122,6 +123,7 @@ GormCore_HEADER_FILES = \
GormCore_OBJC_FILES = \
GormAbstractDelegate.m \
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

@ -1798,6 +1798,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: [NSString stringWithFormat: @"#ifndef %@_H_INCLUDE\n", className]];
[headerFile appendString: [NSString stringWithFormat: @"#define %@_H_INCLUDE\n\n", className]];
@ -1840,6 +1844,8 @@
[headerFile appendString: [NSString stringWithFormat: @"#endif // %@_H_INCLUDE\n", className]];
[sourceFile appendFormat: @"@end\n"];
[headerFile appendString: [NSString stringWithFormat: @"#endif // INCLUDED_%@_H", className]];
headerData = [headerFile dataUsingEncoding:
[NSString defaultCStringEncoding]];
sourceData = [sourceFile dataUsingEncoding: