Skip to content

Commit

Permalink
🎁 add reporduce code for candidateStringIdentifier:
Browse files Browse the repository at this point in the history
  • Loading branch information
mzp committed Oct 11, 2017
1 parent 4970755 commit 0be199e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions NumberInput/NumberInputController.m
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,13 @@ - (BOOL)convert:(NSString*)trigger client:(id)sender
[candidates setPanelType:kIMKSingleRowSteppingCandidatePanel];
}
_currentClient = sender;
[candidates updateCandidates]; // This updates the candidates.
[candidates show:kIMKLocateCandidatesBelowHint]; // This shows the candidates. If possible, display them below the users current
// insertion point.


[candidates setCandidateData:@[ @"a", @"b", @"c"]];
[candidates show:kIMKLocateCandidatesBelowHint];

NSInteger n = [candidates candidateStringIdentifier: @"a"];
NSInteger m = [candidates candidateStringIdentifier: @"b"];
NSLog(@"id of a: %ld, id of b: %ld", n, m);
handled = YES;
}
else {

Expand Down

0 comments on commit 0be199e

Please sign in to comment.