--- np2/macosx/dialog/screenopt.cpp 2003/10/31 16:55:06 1.1 +++ np2/macosx/dialog/screenopt.cpp 2004/03/22 17:56:35 1.3 @@ -161,7 +161,7 @@ static pascal OSStatus sliderEventHandle ControlRef theControl = (ControlRef)inUserData; if (GetControlID(theControl, &conID) == noErr) { if (conID.signature == 'sl/f' && conID.id == 4) { - base = 31; + base = 32; } } return( changeSlider(theControl, screenWin, base) ); @@ -181,7 +181,6 @@ static pascal OSStatus PrefsTabEventHand static void makeNibWindow (IBNibRef nibRef) { OSStatus err; short i; - ControlRef targetCon[5]; err = CreateWindowFromNib(nibRef, CFSTR("ScreenDialog"), &screenWin); if (err == noErr) { @@ -196,13 +195,15 @@ static void makeNibWindow (IBNibRef nibR { kEventClassControl, kEventControlValueFieldChanged } }; for (i=0;i<5;i++) { - targetCon[i] = getControlRefByID('sl/f',i,screenWin); - InstallControlEventHandler( targetCon[i], sliderEventHandlerProc , GetEventTypeCount(sliderControlEvents), sliderControlEvents, (void *)targetCon[i], NULL ); + ControlRef target; + target = getControlRefByID('sl/f', i, screenWin); + InstallControlEventHandler(target, sliderEventHandlerProc, GetEventTypeCount(sliderControlEvents), sliderControlEvents, (void *)target, NULL ); } EventHandlerRef ref; InstallWindowEventHandler (screenWin, NewEventHandlerUPP(cfWinproc), GetEventTypeCount(list), list, (void *)screenWin, &ref); - ShowSheetWindow(screenWin, hWndMain); + + ShowSheetWindow(screenWin, hWndMain); err=RunAppModalLoopForWindow(screenWin); }