mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 03:51:00 +00:00
Fix to ignore storyboard instantiation with blank id, refactoring on another branch
This commit is contained in:
parent
7850f8e61b
commit
e97aee7bca
1 changed files with 98 additions and 98 deletions
|
@ -163,20 +163,18 @@ static NSStoryboard *__mainStoryboard = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
|
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
|
||||||
{
|
|
||||||
if (identifier != nil)
|
|
||||||
{
|
{
|
||||||
return [self instantiateControllerWithIdentifier: identifier
|
return [self instantiateControllerWithIdentifier: identifier
|
||||||
creator: nil];
|
creator: nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
|
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
|
||||||
creator: (NSStoryboardControllerCreator)block
|
creator: (NSStoryboardControllerCreator)block
|
||||||
{
|
{
|
||||||
id result = nil;
|
id result = nil;
|
||||||
|
|
||||||
|
if (identifier != nil)
|
||||||
|
{
|
||||||
NSMutableArray *topLevelObjects = [NSMutableArray arrayWithCapacity: 5];
|
NSMutableArray *topLevelObjects = [NSMutableArray arrayWithCapacity: 5];
|
||||||
NSDictionary *table = [NSDictionary dictionaryWithObjectsAndKeys: topLevelObjects,
|
NSDictionary *table = [NSDictionary dictionaryWithObjectsAndKeys: topLevelObjects,
|
||||||
NSNibTopLevelObjects,
|
NSNibTopLevelObjects,
|
||||||
|
@ -265,6 +263,8 @@ static NSStoryboard *__mainStoryboard = nil;
|
||||||
{
|
{
|
||||||
CALL_BLOCK(block, self);
|
CALL_BLOCK(block, self);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue