comparison ios/dw.m @ 2429:89f4aba2e387

iOS: Put back missing tree selection code, since it is apparently also used for containers. I had removed it thinkit it was just for the missing trees.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 05 Apr 2021 14:36:23 +0000
parents 9c5b95d66fc8
children e08968d21d45
comparison
equal deleted inserted replaced
2428:9c5b95d66fc8 2429:89f4aba2e387
485 int (* API valuechangedfunc)(HWND, int, void *) = (int (* API)(HWND, int, void *))handler->signalfunction; 485 int (* API valuechangedfunc)(HWND, int, void *) = (int (* API)(HWND, int, void *))handler->signalfunction;
486 int selected = DW_POINTER_TO_INT(event); 486 int selected = DW_POINTER_TO_INT(event);
487 487
488 return valuechangedfunc(handler->window, selected, handler->data);; 488 return valuechangedfunc(handler->window, selected, handler->data);;
489 } 489 }
490 /* Tree class selection event */
491 case 12:
492 {
493 int (* API treeselectfunc)(HWND, HTREEITEM, char *, void *, void *) = (int (* API)(HWND, HTREEITEM, char *, void *, void *))handler->signalfunction;
494 char *text = NULL;
495 void *user = NULL;
496 id item = nil;
497
498 if([object isKindOfClass:[UITableView class]] && event)
499 {
500 void **params = (void **)event;
501
502 text = params[0];
503 user = params[1];
504 }
505
506 return treeselectfunc(handler->window, item, text, handler->data, user);
507 }
490 /* Set Focus event */ 508 /* Set Focus event */
491 case 13: 509 case 13:
492 { 510 {
493 int (* API setfocusfunc)(HWND, void *) = (int (* API)(HWND, void *))handler->signalfunction; 511 int (* API setfocusfunc)(HWND, void *) = (int (* API)(HWND, void *))handler->signalfunction;
494 512
6120 { 6138 {
6121 DW_FUNCTION_INIT; 6139 DW_FUNCTION_INIT;
6122 DWContainer *cont = handle; 6140 DWContainer *cont = handle;
6123 int lastQueryPoint = [cont lastQueryPoint]; 6141 int lastQueryPoint = [cont lastQueryPoint];
6124 NSArray *selected = [cont indexPathsForSelectedRows]; 6142 NSArray *selected = [cont indexPathsForSelectedRows];
6125 NSIndexPath *result = [selected objectAtIndex:lastQueryPoint]; 6143 NSIndexPath *result = lastQueryPoint < [selected count] ? [selected objectAtIndex:lastQueryPoint] : nil;
6126 void *retval = NULL; 6144 void *retval = NULL;
6127 6145
6128 if(result) 6146 if(result)
6129 { 6147 {
6130 if(flags & DW_CR_RETDATA) 6148 if(flags & DW_CR_RETDATA)