data2
追加データ2を返します
解説
追加データ2を返します。
NSAppKitDefined、NSApplicationDefined、NSSystemDefined、NSPeriodicのイベントでなければNSInternalInconsistencyExceptionを起こします。
返り値
( int )
整数値
引数
フレームワーク
ApplicationKit
クラス
NSEvent
Instance Methods
使用可能
10.0
参照
- data1
- subtype
+ otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:
例文
#import "MyScrollView.h" @implementation MyScrollView - (void)mouseDown:(NSEvent *)event { NSEvent *ev = [NSEvent otherEventWithType:NSAppKitDefined location:[event locationInWindow] modifierFlags:nil timestamp:nil windowNumber:[event windowNumber] context:[event context] subtype:nil data1:10 data2:11 ]; [NSApp sendEvent:ev]; NSLog([NSString stringWithFormat:@"%u",[ev data2]]); } @end