--- np2/macosx/dialog/screenopt.cpp 2003/11/08 17:54:27 1.2 +++ np2/macosx/dialog/screenopt.cpp 2004/03/22 17:56:35 1.3 @@ -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); }