// Classifier boundaries and real native inspector selection, without opening a sampler. { const float points[][4]={{1,.04,.02,0},{1,.5,.02,1},{.95,.9,.02,2},{.03,.8,.05,3},{.02,.8,.8,4},{.02,.12,.9,5},{.55,.08,.95,6},{.95,.04,.6,7}, {.95,.8,.79,1},{.91,.7,.73,1},{.74,.46,.44,1},{.65,.42,.28,1},{.27,.16,.12,1},{.5,.5,.5,-1},{1,1,1,-1},{0,0,0,-1},{.5,.49,.48,-1},{NAN,.3,.2,-1}}; for(unsigned i=0;i_values copy]autorelease];NSData *pickTools=[NSKeyedArchiver archivedDataWithRootObject:DYReadTools(pickHost,kCMTimeZero) requiringSecureCoding:YES error:nil]; for(NSUInteger editorIndex=0;editorIndex_values]&&[pickTools isEqual:pickAfter]&&pickHost->_undoStarts==0); } // Menu headings must never shift persisted raw IDs. Exercise every selectable // value through the real inspector action and refresh, including old DJI IDs. { DYDiagnosticManager *menuHost=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(menuHost,nil); DYInspector *menuEditor=[[[DYInspector alloc]initWithAPIManager:menuHost]autorelease];[menuEditor refresh]; NSDictionary *controls=[menuEditor valueForKey:@"controls"]; for(NSString *key in @[@"cminputGamut",@"cmworkingGamut",@"cmoutputGamut",@"cminputTransfer",@"cmworkingTransfer",@"cmoutputTransfer"]){ NSDictionary *record=nil;for(NSDictionary *r in controls.allValues)if([r[@"descriptor"][@"key"]isEqual:key])record=r; NSDictionary *descriptor=record[@"descriptor"];NSPopUpButton *popup=record[@"popup"];NSArray *values=descriptor[@"values"];BOOL matches=popup&&values.count; NSUInteger headings=0,selectable=0;for(NSMenuItem *item in popup.itemArray){if(item.separatorItem)continue;if(item.tag==-1){headings++;matches&=!item.enabled;}else selectable++;} matches&=selectable==values.count&&headings==([key hasSuffix:@"Gamut"]?2:0); for(NSNumber *value in values){ matches&=[popup selectItemWithTag:value.integerValue];[menuEditor performSelector:@selector(scalarChanged:) withObject:popup]; double stored=-1;[menuHost getFloatValue:&stored fromParameter:[descriptor[@"pid"]unsignedIntValue] atTime:kCMTimeZero];[menuEditor refresh]; matches&=stored==value.doubleValue&&popup.selectedItem.tag==value.integerValue; } run.record([@"cst-grouped-popup-retains-all-raw-ids-" stringByAppendingString:key],matches); } }