[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with view-deactivate-event-handler



In article <9502132245.AA25348@media.mit.edu>, abegel@media.mit.edu writes:
|> I tried defining this method on a window I had, so that when it was deactivated
|> it would go to the back of all of the windows.
|> 
|> (defmethod view-deactivate-event-handler ((window procs-window))
|>   (set-window-layer window (length (windows)))
|>   (call-next-method))
|> 
|> Theorectically, this should have worked. Unfortunately, all Lisp did 
|> upon deactivation of said window was to infinitely recurse calling
|> view-deactivate-event-handler and die with a stack overflow.
|> 

Since set-window-layer can cause a window to be activated or deactivated, 
the call to set-window-layer should also send a deactivate or activate event 
(in this case deactivate) to the window, causing set-window-layer to be 
called again, which sends a deactivate event to the window, which causes 
set-window-layer to be called again, which sends a deactivate event to  
the window which causes set-window-layer to be called...

Regards,
Steve
-- 

smiklos@panix.com,  noslfcntrl@aol.com   Steve Miklos @ home
Not speaking for the Big Bank
Too mcuh coffee affects my tpying