0
這是我必須處理平滑滾動的代碼片段。這裏是NSLog的輸出:從GetEventParameter獲取錯誤代碼
2010-06-21 16:04:10.524 PDFViewWXOSX[80161:a0f] first error: -9870 2010-06-21 16:04:10.525 PDFViewWXOSX[80161:a0f] second error: 0 2010-06-21 16:04:10.552 PDFViewWXOSX[80161:a0f] first error: 0 2010-06-21 16:04:10.553 PDFViewWXOSX[80161:a0f] second error: 0 2010-06-21 16:04:10.582 PDFViewWXOSX[80161:a0f] first error: 0 2010-06-21 16:04:10.582 PDFViewWXOSX[80161:a0f] second error: 0 2010-06-21 16:04:10.588 PDFViewWXOSX[80161:a0f] first error: -9870 2010-06-21 16:04:10.589 PDFViewWXOSX[80161:a0f] second error: 0 2010-06-21 16:04:10.652 PDFViewWXOSX[80161:a0f] first error: 0 2010-06-21 16:04:10.652 PDFViewWXOSX[80161:a0f] second error: 0 2010-06-21 16:04:10.723 PDFViewWXOSX[80161:a0f] first error: 0 2010-06-21 16:04:10.723 PDFViewWXOSX[80161:a0f] second error: 0
SInt32 scroll_delta_x = 0, scroll_delta_y = 0;
OSErr err = noErr;
err = GetEventParameter(cEvent, kEventParamMouseWheelSmoothHorizontalDelta,
typeSInt32, NULL, sizeof(scroll_delta_x), NULL,
&scroll_delta_x);
NSLog(@"first error: %d", err);
if (err == noErr) {
deltaX = scroll_delta_x;
}
err = noErr;
err = GetEventParameter(cEvent, kEventParamMouseWheelSmoothVerticalDelta,
typeSInt32, NULL, sizeof(scroll_delta_y), NULL,
&scroll_delta_y);
NSLog(@"second error: %d", err);
if (err == noErr) {
deltaY = scroll_delta_y;
}
我找不到有關錯誤-9870的任何信息。到底是怎麼回事?