зеркало из https://github.com/microsoft/ace.git
iOS SelectionChanged event: pass item + index
This commit is contained in:
Родитель
1455a52d8a
Коммит
1098e5dcd5
|
@ -165,7 +165,7 @@
|
|||
NSObject* selection = _Items[indexPath.row];
|
||||
|
||||
if (_selectionChangedHandlers > 0) {
|
||||
[OutgoingMessages raiseEvent:@"selectionchanged" instance:self eventData:selection];
|
||||
[OutgoingMessages raiseEvent:@"selectionchanged" instance:self eventData:selection eventData2:[NSNumber numberWithInt:indexPath.row]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
+ (void) setCallbackContext:(NSObject*)callback selector:(SEL)selector;
|
||||
+ (void) raiseEvent:(NSString*)eventName instance:(NSObject*)instance eventData:(NSObject*) eventData;
|
||||
+ (void) raiseEvent:(NSString*)eventName instance:(NSObject*)instance eventData:(NSObject*) eventData eventData2:(NSObject*) eventData2;
|
||||
+ (void) raiseEvent:(NSString*)eventName handle:(AceHandle*)handle eventData:(NSObject*) eventData;
|
||||
|
||||
@end
|
||||
|
|
|
@ -19,8 +19,14 @@ SEL _selector;
|
|||
+ (void) raiseEvent:(NSString*)eventName instance:(NSObject*)instance eventData:(NSObject*) eventData {
|
||||
NSArray* array = [NSArray arrayWithObjects:
|
||||
instance == nil ? nil : [[AceHandle fromObject:instance] toJSON],
|
||||
eventName,
|
||||
eventData, nil];
|
||||
eventName, eventData, nil];
|
||||
[self send:array];
|
||||
}
|
||||
|
||||
+ (void) raiseEvent:(NSString*)eventName instance:(NSObject*)instance eventData:(NSObject*) eventData eventData2:(NSObject*) eventData2 {
|
||||
NSArray* array = [NSArray arrayWithObjects:
|
||||
instance == nil ? nil : [[AceHandle fromObject:instance] toJSON],
|
||||
eventName, eventData, eventData2, nil];
|
||||
[self send:array];
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче