Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!claris!apple!dan From: dan@Apple.COM (Dan Allen) Newsgroups: comp.sys.mac.programmer Subject: Re: Graphic window from MPW tool Message-ID: <8064@apple.Apple.Com> Date: 12 Apr 88 18:28:59 GMT References: <1330@PT.CS.CMU.EDU> <408@swanee.OZ> Reply-To: dan@apple.UUCP (Dan Allen) Organization: Apple Computer Inc, Cupertino, CA Lines: 40 As a co-creator of the MPW Shell, I would like to set the graphical tool controversy to rest. Here is the scoop: a) Graphics instructions in MPW Tools are perfectly harmless. They work fine, as long as InitGraf(@thePort) is done right. Since an MPW Tool has its own A5 World, it has its own set of QuickDraw globals and can draw to its heart's content. b) Where to draw? Well, a tool can draw anywhere it likes to I suppose, but it SHOULD draw in its own window, obviously. c) Tools & Windows. A tool can have its own window. MPW 2.0 ships several tools which have their own windows, including Commando, GetFileName, etc. MPW Tool windows must be MODAL dialogs, however, to work right currently. You can also have nested Modal dialogs. d) Tools & Events. Here is the crux of the problem. Tools can have their own MainEventLoop while in a ModalDialog, but tools cannot currently have their own Modeless windows. Why? Well, the MPW Shell currently does not have a good info passing mechanism for passing events to tools that the Shell does not understand. Such a mechanism is needed in order to put up Modeless windows. Remember that since MPW Tools are guests in the MPW Shell's heap that they should not initialize the Window Manager or Menu Manager since they are already up and working. The warnings in the MPW 2.0 manual about graphical tools should have been warnings about tools having Modeless windows. As long as you can constrain your tools to one or more Modal dialogs, then everything should be fine. To get an idea about what can be done, take a look at Commando. If you have more questions about MPW Tools and graphics, just ask. Dan Allen Software Explorer Apple Computer