Update connections inspector to sort the outlets and actions so that it is easier to location connections

This commit is contained in:
Gregory John Casamento 2023-07-27 03:05:32 -04:00
parent 637f83c13d
commit 84ef8437f2

View file

@ -214,8 +214,10 @@
if ([con isKindOfClass: [NSNibControlConnector class]] == YES)
{
RELEASE(actions);
actions = RETAIN([[(id<GormAppDelegate>)[NSApp delegate] classManager]
allActionsForObject: [con destination]]);
actions = [[(id<GormAppDelegate>)[NSApp delegate] classManager]
allActionsForObject: [con destination]];
actions = [actions sortedArrayUsingSelector: @selector(compare:)];
RETAIN(actions);
break;
}
else
@ -227,8 +229,10 @@
if (con == nil) // && [actions containsObject: [currentConnector label]] == NO)
{
RELEASE(actions);
actions = RETAIN([[(id<GormAppDelegate>)[NSApp delegate] classManager]
allActionsForObject: [[NSApp delegate] connectDestination]]);
actions = [[(id<GormAppDelegate>)[NSApp delegate] classManager]
allActionsForObject: [[NSApp delegate] connectDestination]];
actions = [actions sortedArrayUsingSelector: @selector(compare:)];
RETAIN(actions);
if ([actions count] > 0)
{
con = [[NSNibControlConnector alloc] init];
@ -584,7 +588,9 @@ selectCellWithString: (NSString*)title
[connectors addObjectsFromArray: array];
RELEASE(outlets);
outlets = RETAIN([[(id<GormAppDelegate>)[NSApp delegate] classManager] allOutletsForObject: object]);
outlets = [[(id<GormAppDelegate>)[NSApp delegate] classManager] allOutletsForObject: object];
outlets = [outlets sortedArrayUsingSelector: @selector(compare:)];
RETAIN(outlets);
DESTROY(actions);
[oldBrowser loadColumnZero];