[comp.sys.amiga.tech] CloseWindow

vinsci@ra.abo.fi (Leonard Norrgard) (07/13/89)

  Today we encountered a slight problem with CloseWindow(). When we close
one window (window A), the result is a change in another windows Flags
(window B, a backdrop window), namely the REPORTMOUSE flag, which is cleared.
Window B becomes active when window A is closed.

  This is what happens in the code:

  A gadget in the window is double-clicked. This eventually leads to
the gadgets window being closed. The gadget has the flags GADGIMMEDIATE,
RELVERIFY and *FOLLOWMOUSE* set, and is of type boolean (hit select).

  After the double-click, CloseWindow(A) is called. When window B:s
Flags is examined it's REPORTMOUSE flag has been cleared.

  If we insert a Delay(100); before the CloseWindow(A) call, everything works
OK. A Delay(10); is not long enough.

  For now, we'll just set the flag after the call, but we'd like to know
why this happens, and if there's some other way around it.

Clues?

--
Leonard Norrgard, vinsci@abo.fi, vinsci@finabo.bitnet, +358-21-654474, EET.

usenet@cps3xx.UUCP (Usenet file owner) (07/14/89)

In article <VINSCI.89Jul13032359@ra.abo.fi> vinsci@abo.fi writes:
>
>  If we insert a Delay(100); before the CloseWindow(A) call, everything works
>OK. A Delay(10); is not long enough.

This reminds me of a bug I found, but have yet gotton around to
reporting :-( (shame on me). It may be that this is the same bug.

If you make type and run resident, have NEWCON: mounted and do the following:

in RAM: have a script and a big file. The script is just a bunch of 
 run type >newcon:0/0/640/100/BUG! ram:bigfile

 and execute it.

 You should probly have 30-40 "types" to assure that the bug will show.


This will usually crash the machine even when there is plenty of memory
(i think, but I only have 512K ). I think that some of the windows
started closeing when it crashed every time I tried it.


I found this out when I was testing the residentability of a program
I was writing.


REAL NAME: Joe Porkka   jap@frith.cl.msu.edu