Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!thecloud From: thecloud@dhw68k.cts.com (Ken McLeod) Newsgroups: comp.sys.mac.programmer Subject: Re: Missing update events in SFGetFile (system 7.0) Message-ID: <1990Aug19.110544.12102@dhw68k.cts.com> Date: 19 Aug 90 11:05:44 GMT References: <1990Aug15.121158.813@lth.se> Reply-To: thecloud@dhw68k.cts.com (Ken McLeod) Organization: Wolfskill & Dowling residence; Anaheim, CA (USA) Lines: 47 In article <1990Aug15.121158.813@lth.se> sund@tde.lth.se (Lars Sundstr|m) writes: >When using SFPGetFile in system 7.0 it seems like no update event >appears when the dialog shows up. Should it be like this or not? >If so, it will not be possible to draw the outline of the default >button upon an update event - not without creating another userItem. >I checked the Bug Stack but couldn't find anything. ^^^^^^^^^ Is there a "System 7.0 Bug Stack" out there? Is this official stuff? I thought they weren't counting the bugs yet :-) If this is a topic open for discussion, let me describe something I've noticed in 7.0a9 which may be old news already. I have a program which puts up a modal alert with a filterProc. When the filterProc gets an update event, it does some drawing using black & white, then changes the default palette and draws a color picture. Here's the problem: under 7.0a9, the call to SetPalette/ActivatePalette *erases* my alert window to white...anything previously drawn in the window is gone. Here's where it happens: if (theEvent->what == updateEvt) { SetPort(theDialog); if (gInColor) RGBForeColor(&blackRGB); FillRect(&theDialog->portRect, black); /* paint it black... */ if (gInColor) { ourPal = GetNewPalette(200); /* my default 'pltt' resource */ SetPalette((WindowPtr) -1L, ourPal, TRUE); /* as per TN #211 */ ActivatePalette((WindowPtr) theDialog); } ... /* When running under 6.0.x, the window is still black at this point. Under 7.0a9, the window has been erased to white (not good!) */ DrawPicture(myClrPic, &tempRect); 'theDialog' is the first argument passed to the filterProc. 'blackRGB' is an RGBColor containing r,g,b values of 0. My 'pltt' has black and white defined as the first two entries (about 140 entries total, all pmTolerant). The code works perfectly on all machines running System 6.0.x. Is this a known System 7 bug (I hope)? -ken -- ========== ....... ============================================= Ken McLeod :. .: UUCP: ...{spsd,zardoz,felix}!dhw68k!thecloud ========== :::.. ..::: INTERNET: thecloud@dhw68k.cts.com //// =============================================