Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!lansd From: lansd@utgpu.UUCP Newsgroups: comp.sys.atari.st Subject: Desk Accessory problems in MWC Message-ID: <1987Oct3.232002.20769@gpu.utcs.toronto.edu> Date: Sat, 3-Oct-87 23:20:02 EDT Article-I.D.: gpu.1987Oct3.232002.20769 Posted: Sat Oct 3 23:20:02 1987 Date-Received: Sun, 4-Oct-87 03:02:25 EDT Organization: University of Toronto Computing Services Lines: 48 Checksum: 17665 I have several questions about DA under Mark Williams C (Ver 2.1.7): 1) The MWC manual under 'desk accessories' mentions that 'malloc()' should not be used in a DA. Why? Can I use Malloc() instead? I presently use malloc() in the main() of the DA - do they mean not to use malloc() in the DA loop where it actually performs its function, instead of the main() initilization part? 2) When a window is open when I call up my DA, a weird thing happens when a dialog is removed from the screen that it puts up. The sequence is... a) Desk accesory is started b) DA saved the screen to buffer c) A large dialog is put up on screen d) User invoked action causes File selector (or some other) dialog to be called up on top of the main dialog. e) The new sub-dialog saves the screen in a 2nd buffer. f) Dialog/file-selector is handled and returns to the DA ok. g) The DA dumps the screen buffer back to the screen (ok). h) *** PROBLEM *** After the main dialog has been redrawn from the screen buffer and calls form_do() once again to get the next user object hit, GEM comes along and places its window OVER TOP of my main dialog!!!! Only the screen area that the sub-dialog covered is updated. WHY IS GEM DOING THIS???? I know it occurs when form_do() is called. Do I have to remove all messages from the AES message array before I call form_do() again? (but I can't call evnt_multi() to pick them up). 3) For the program version of my DA, the sliders work fine. But on the DA the followng happens: a) Pressing the button over the slider (which calls graf_slidebox) shows the slider change into a graf_slidebox outlined box then hangs. b) Pressing the button over the left or right arrows (TOUCHEXIT buttons) returns to my program on the button press, but does not return to my program while the button is being held down c) If the left button is pressed, the first press is registered by my program but the second button press SELECTS THE GARBAGE CAN ICON UNDER THE DIALOG (and displays it OVER the dialog). These problems show that by calling form_do() the DA is relinquishing control to the other application running (the desktop). I know that GEM is switching between the two applications on each call, but HOW DO I PREVENT THESE PROBLEMS FROM HAPPENING?