dmg@beaver.cs.washington.edu (David Geary) (08/04/89)
First, thanks to all who responded to my request concerning closing a window without confirming. Now I have a another question... I open a window (window #1) under SunView using window_create(), and then a subsequent call to window_main_loop(). If I detect certain events in the window, I want another window to open (window #2), and receive events in the new window. When a certain event occurs in window #2, I close the window, and want to start getting events in window #1 once again. Here's what I want to do: create_window() creates window #1 window_main_loop() for window #1 later on... create_window() creates window #2 window_main_loop() for window #2 later on... window_done() for window #2 At this point, I want to start getting events for window #1 again. When I try this, I run into problems: 1. When I call window_main_loop() for window #2, I get: Notifier error: Invalid argument 2. When I quit out of window #2, I get a stream of: . . . WIN ioctl number 2000671E: Bad file number WIN ioctl number C00C671D: Bad file number WIN ioctl number C014671F: Bad file number WIN ioctl number C0146720: Bad file number WIN ioctl number 2000671E: Bad file number . . . 3. After quitting out of window #2, window #1 is dead in the water. It gets no events. I must be hosing the notifier by calling window_main_loop() a second time before the first call to window_main_loop() returns. I realize that I could use a SunView popup to do what I want, but, for reasons I won't go into, I need it to be just a regular old window. BTW I have RTFM, but I've gotten nowhere ;-( Any suggestions? -- David Geary, Boeing Aerospace, Seattle "I wish I lived where it *only* rains 364 days a year"
jaysun@eng.clemson.edu (Jay Williamson) (08/22/89)
In article <2835@ssc-vax.UUCP> ssc-vax!dmg@beaver.cs.washington.edu (David Geary) writes: >I open a window (window #1) under SunView using window_create(), and then >a subsequent call to window_main_loop(). If I detect certain events in >the window, I want another window to open (window #2), and receive events >in the new window. When a certain event occurs in window #2, I close the >window, and want to start getting events in window #1 once again. > Try creating your second window (or third, fourth, etc..) at the same time you create your original but set WIN_SHOW, FALSE When you want to see the second window just set WIN_SHOW, TRUE When you want to get rid of the window just set WIN_SHOW, FALSE again Good luck Jay Williamson Engineering Computer Operations jaysun@eng.clemson.edu Clemson University |---------------------------------------------------------| | "A conclusion is the place were you got tired | | of thinking." | | --Arthur Block | |---------------------------------------------------------| Jay Williamson <jaysun@eng.clemson.edu>