Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!Apple.COM!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Dialog Edit menu, display of shortcuts (was: Movable-Modal WDEF) Message-ID: <7085@goofy.Apple.COM> Date: 9 Mar 90 00:27:15 GMT Sender: usenet@Apple.COM Organization: Objects-R-Us, Apple Computer, Inc. Lines: 44 References:<39127@apple.Apple.COM> <1831@esquire.UUCP> <10672@hoptoad.uucp> <1838@esquire.UUCP> In article <1838@esquire.UUCP> baumgart@esquire.dpw.com (Steve Baumgarten) writes: > Just out of curiosity, does MacApp provide support for this? I don't think that MacApp makes the edit commands available in all dialogs. If you use MacApp 2.0's dialog support, then users can pull down menus while a modal dialog is up (and of course use the command-key equivalents). This is easy to do because the window is implemented like a normal window; not using the Dialog Manager. Most commands end up grayed out (and if all the items in a menu are disabled the menu title is disabled). Specific menu items will be enabled based on what's appropriate to the dialog. If there is no selection, for example, then Cut & Copy will be disabled. (This is the standard MacApp technique.) As an example of what you can do, I wrote an application that displays a modeal about box. The about box displays a picture which the user can scroll through, and the picture can be printed by using the normal print menu commands. I didn't have to do anything special except make sure that the picture view was printable. I once did a patch to ModalDialog that inserted a custom filter proc in every modal dialog. I did this originally to solve the problem that when a modal dialog comes up, the old front window doesn't get a deactivate event. (That's because the event goes to the Dialog Manager, which doesn't know what to do with it.) The effect is that the old front window won't disable its scroll bars. Also, the application will get an activate event when the modal dialog goes away, so you have to be careful about using XOR highlighting. The same basic technique could be used pass command keys through the application's normal event processing code, as a way of making the edit command keys available. Larry Rosenstein, Apple Computer, Inc. Object Specialist Internet: lsr@Apple.com UUCP: {nsc, sun}!apple!lsr AppleLink: Rosenstein1