Mercurial > dwindows
diff ios/dw.m @ 2389:7b06fc7c8130
iOS: Remove some legacy code from macOS 10.5 by swithing to using
NSPointerArray method pointerArrayWithOptions: with the option
NSPointerFunctionsOpaqueMemory, so we don't mess with the user memory
pointers.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 23 Mar 2021 23:14:13 +0000 |
parents | d84cd4227b21 |
children | 2613d1533f1a |
line wrap: on
line diff
--- a/ios/dw.m Tue Mar 23 22:35:37 2021 +0000 +++ b/ios/dw.m Tue Mar 23 23:14:13 2021 +0000 @@ -1725,19 +1725,8 @@ } -(void)setup { - SEL swopa = NSSelectorFromString(@"pointerArrayWithWeakObjects"); - - if(![[NSPointerArray class] respondsToSelector:swopa]) - swopa = NSSelectorFromString(@"weakObjectsPointerArray"); - if(![[NSPointerArray class] respondsToSelector:swopa]) - return; - - DWIMP iwopa = (DWIMP)[[NSPointerArray class] methodForSelector:swopa]; - - titles = iwopa([NSPointerArray class], swopa); - [titles retain]; - rowdatas = iwopa([NSPointerArray class], swopa); - [rowdatas retain]; + titles = [[NSPointerArray pointerArrayWithOptions:NSPointerFunctionsOpaqueMemory] retain]; + rowdatas = [[NSPointerArray pointerArrayWithOptions:NSPointerFunctionsOpaqueMemory] retain]; tvcols = [[[NSMutableArray alloc] init] retain]; data = [[[NSMutableArray alloc] init] retain]; types = [[[NSMutableArray alloc] init] retain];