Number: 712 Date: 16-Apr-84 12':10':54 Submitter: le.pasa Source: KOBRYN@NOSC-F4.ARPA(Kiewiet.Pasa) Subject: Document use of process fns from within menu fns Assigned To: Attn: vanMelle, Burton Status: Open In/By: Problem Type: Documentation Impact: Moderate Difficulty: Easy Frequency: Everytime Priority: Perhaps System: Operating System Subsystem: Processes Machine: Disk: Lisp Version: Fugue.6 Source Files: Microcode Version: Memory Size: File Server: Server Software Version: Disposition: ' [4/16/84 tl': Lorraine''s remark for specifying this as serious':' I''d like to give this a Serious rating, because of who the customer is and what kinds of problems they''ve had in the past. The Navy could become a much larger customer, and they have had numerous DLion problems.]' [4/18/84 tl': Burton''s answers are added on description field]' [4/18/84 mjs': added another answer from vanMelle, reopened AR as documentation AR, lowered priority] Description: ' We are in the process of developing a menu-based interface on our' D-Lions, which is meant to be the front-end for an Expert System' we are overhauling. While working with menus of the "fixed"' variety (i.e. ADDMENU type) we''ve encountered all sorts of difficulties' in getting functions triggered by menu-selection working properly.' ' Two of our main difficulties have been':' ' 1) spawning excess processes;' 2) need to activate windows via the mouse cursor' to accept keyboard input when fcn is triggered' by a menu---something which isn''t necessary for' the same fcn when called from without the menu.' ' Any insights/help you might furnish would be appreciated.' Thank you.' ' ------' ' Date': 17 Apr 84 18':42 PST' From': Burton.pa' Subject': Re': AR 712' In-reply-to': le.pasa''s message of 16 Apr 84 12':14':36 PST (Monday)' To': le.pasa' cc': lispsupport.pa' ' 1) spawning excess processes': The WHENSELECTEDFN of a fixed menu is evaluated in the MOUSE process. You may want it to be evaluated in the process associated with the window the menu is in (or the one it is attached to). Your WHENSELECTEDFN must do that itself by calling PROCESS.EVAL on the process. If one of these windows was the TTYDISPLAYSTREAM of a process (e.g. ever used for echoing type in), then the process is on the window property named PROCESS. If it wasn''t, you can safely put the process on the PROCESS windowproperty and fetch it from there.' ' If you eval within the mouse process, then when the form being evaluated needs to get input, the system automatically spawns a new mouse process (since the old one is getting the input and isn''t available for mouse tracking). This may be where your extra processes are coming from.' ' 2) activating windows': A process can grab the tty itself by executing the function (TTY.PROCESS). This wasn''t needed when you call your function directly because it probably already had the tty. ' ' richard' ' ps': Michael, this should probably be turned into an AR on the documentation.' ' -----' ' Date': 18 Apr 84 11':57 PST' From': vanMelle.pa' Subject': Re': AR 712': Document use of process fns from within menu fns' In-reply-to': LispSupport.pa''s message of 17 Apr 84 18':50':00 PST (Tuesday)' To': LispSupport.pa' cc': vanMelle.pa' ' Manual p 18.35 section 18.20.7 "Keeping the Mouse Alive" discusses SPAWN.MOUSE and ALLOW.BUTTON.EVENTS. These should probably be pointed to by the window section, as in "If you have a function that might be invoked by mouse action that waits for results from a window menu or other mouse-activated object, you probably need to call ALLOW.BUTTON.EVENTS (sec xxx)."' ' [bvm': see also AR 712 for another confused user]' Workaround: Test Case: Edit-By: vanMelle Edit-Date: 15-May-84 14':28':41