🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #16861

Re: Graying Out Text Items

#16861
From: Larry Rosenstein
Date: Fri, 12 Jun 1987 16:29
18 lines
1350 bytes
Your code for GrayDItem is perfect.  But the question is when do you call
GrayDItem?  

One way is to define a UserItem.  

Another way is to provide a filter proc to ModalDialog that checks for
update events and when it gets one, calls DialogSelect to do the update and
then GrayDItem to gray out the item.  The filter proc would return TRUE to
indicate that it handled the event.  I think it is OK to call DialogSelect
for a modal dialog (that is what ModalDialog does after all).

If you just gray out the item when the dialog first appears, then it will
lose its grayness if an update event happens.  An update event could occur,
for example,  if a screen saver blanks the screen while the dialog is up.
(A lot of program seems to make the mistake of drawing in the dialog window
and expecting it to always show up.)

Larry
Technical Details
Message-ID: <8706122144.AA26248@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!uunet!peregrine!ccicpg!felix!hplabs!ucbvax!apple.CSNET!lsr

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!uunet!peregrine!ccicpg!felix!hplabs!ucbvax!apple.CSNET!lsr
From: lsr@apple.CSNET (Larry Rosenstein)
Newsgroups: comp.sys.mac
Subject: Re:  Graying Out Text Items
Message-ID: <8706122144.AA26248@ucbvax.Berkeley.EDU>
Date: Fri, 12-Jun-87 12:29:45 EDT
Article-I.D.: ucbvax.8706122144.AA26248
Posted: Fri Jun 12 12:29:45 1987
Date-Received: Sat, 20-Jun-87 20:46:42 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 18