mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Add nib
This commit is contained in:
parent
49b3111124
commit
9c8e6d58ca
3 changed files with 3514 additions and 13 deletions
3485
Tests/gui/NSNibLoading/Test-nib.nib/designable.nib
generated
Normal file
3485
Tests/gui/NSNibLoading/Test-nib.nib/designable.nib
generated
Normal file
File diff suppressed because it is too large
Load diff
BIN
Tests/gui/NSNibLoading/Test-nib.nib/keyedobjects.nib
generated
Normal file
BIN
Tests/gui/NSNibLoading/Test-nib.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
|
@ -8,6 +8,9 @@
|
|||
|
||||
// For some nib/xibs the AppDelegate is defined...
|
||||
@interface AppDelegate : NSObject
|
||||
{
|
||||
IBOutlet NSWindow *window;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
@ -41,20 +44,33 @@ int main()
|
|||
path = [path stringByDeletingLastPathComponent];
|
||||
}
|
||||
|
||||
pass(bundle != NO, "NSBundle was initialized");
|
||||
|
||||
success = [bundle loadNibNamed: @"Test-gorm"
|
||||
owner: [NSApplication sharedApplication]
|
||||
topLevelObjects: testObjects];
|
||||
|
||||
pass(success == YES, ".gorm file was loaded properly using loadNibNamed:owner:topLevelObjects:");
|
||||
|
||||
success = [bundle loadNibNamed: @"Test-xib"
|
||||
owner: [NSApplication sharedApplication]
|
||||
topLevelObjects: testObjects];
|
||||
|
||||
pass(success == YES, ".xib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
|
||||
pass(bundle != nil, "NSBundle was initialized");
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
success = [bundle loadNibNamed: @"Test-gorm"
|
||||
owner: [NSApplication sharedApplication]
|
||||
topLevelObjects: testObjects];
|
||||
|
||||
pass(success == YES, ".gorm file was loaded properly using loadNibNamed:owner:topLevelObjects:");
|
||||
|
||||
success = [bundle loadNibNamed: @"Test-xib"
|
||||
owner: [NSApplication sharedApplication]
|
||||
topLevelObjects: testObjects];
|
||||
|
||||
pass(success == YES, ".xib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
|
||||
|
||||
success = [bundle loadNibNamed: @"Test-nib"
|
||||
owner: [NSApplication sharedApplication]
|
||||
topLevelObjects: testObjects];
|
||||
|
||||
pass(success == YES, ".nib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"%@", [localException reason]);
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
||||
END_SET("NSNibLoading GNUstep basic")
|
||||
|
||||
|
|
Loading…
Reference in a new issue