Newsgroups: comp.lang.lisp.mcl
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!news.alpha.net!uwm.edu!lll-winken.llnl.gov!ames!kronos.arc.nasa.gov!chucko
From: chucko@kronos.arc.nasa.gov (Chuck Fry )
Subject: Help with menu enable/disable and temp. dialogs
Message-ID: <1995Feb2.195748.14157@ptolemy-ethernet.arc.nasa.gov>
Sender: usenet@ptolemy-ethernet.arc.nasa.gov (usenet@ptolemy.arc.nasa.gov)
Nntp-Posting-Host: whitman.arc.nasa.gov
Organization: RECOM Technologies, Code IC, NASA Ames, Moffett Field, CA
Date: Thu, 2 Feb 1995 19:57:48 GMT
Lines: 30


Background: I'm a relative newcomer to the Mac and Mac CL, but have
been programming in Common Lisp for about 8 years.

Our application has several windows.  One of these windows, the
Modeling window, is supposed to enable its menubar menus when it is
the active window, and disable them when it is not.  I naively did
this by calling MENU-ENABLE and MENU-DISABLE within :AFTER methods on
VIEW-ACTIVATE-EVENT-HANDLER and VIEW-DEACTIVATE-EVENT-HANDLER
respectively.

This works when switching between long-lived windows, but it has a
problem when one of the menu operations calls GET-STRING-FROM-USER.
The temporary dialog box pops up over the Modeling window, and the
menus are correctly (?) deactivated.  But when the dialog box goes
away, the menus are NOT reactivated.  The only way to get them back is
to select another window, then reselect the Modeling window.

I've torn my hair out trying to solve this.  The -EVENT-HANDLER
methods are getting called as expected.  Calling DRAW-MENUBAR-IF in
the activate event handler method doesn't fix the problem.

What am I missing, and where can I find the relevant documentation?
As this is holding up an alpha test release, time is of the essence.
Thanks in advance.
 -- Chuck
-- 
 Chuck Fry  Work: chucko@ptolemy.arc.nasa.gov  Play: chucko@rahul.net
	I alone am responsible for the contents of this post.
	    Keep NASA and RECOM Technologies out of this.
