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