mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2025-01-03 07:29:28 +00:00
sort emulators by name.
git-svn-id: svn://qnap.local/TwoTerm/trunk@1894 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
e220e0a458
commit
e36ad042e2
@ -40,6 +40,15 @@ static NSMutableArray *array = nil;
|
||||
array = [NSMutableArray new];
|
||||
|
||||
[array addObject: klass];
|
||||
|
||||
[array sortUsingComparator: ^(id lhs, id rhs){
|
||||
NSString *a, *b;
|
||||
|
||||
a = (NSString *)[lhs name];
|
||||
b = (NSString *)[rhs name];
|
||||
|
||||
return [a caseInsensitiveCompare: b];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user