I need some help with a problem I’m trying to solve using the 7.6 version of VisualWorks. I currently have two different windows open, lets say window a and window b. When the user clicks in window a I would like to bring window b to the front without losing focus in window a. The same is true if the user clicks in window b I would like to bring window a to the front without losing focus in window b.
I’ve found page 3-16 of the GUIDevGuide.pdf has some information about a window being a master and a slave such that certain window events can be triggered to other windows. Below is the example I’ve setup based on the documentation for window events. The steps I’m using to test the example are below:
1. Open a 7.6 image 2. Open the Parcel Manager and load the parcels named Editor1-Example and Editor2-Example from the examples folder 3. Perform a Do-It on the following code in a workspace:
| masterWin slaveWin app sendEvents recEvents | sendEvents := #(#collapse #close). recEvents := sendEvents. app := ApplicationModel new. masterWin := (Editor1Example new) openInterface; mainWindow. masterWin label: 'Master'; application: app; sendWindowEvents: sendEvents; receiveWindowEvents: recEvents. slaveWin := (Editor2Example new) open; mainWindow. slaveWin label: 'Slave'; application: app; sendWindowEvents: sendEvents; receiveWindowEvents: recEvents
When I minimize / collapse either the master or slave window both windows minimize as I expected. The strange part is when I expand both windows and try to minimize again, then the other window doesn’t respond to the event. Ok, so that’s strange. But if you click close on either window, then both windows are closed as I expected. Is this a bug or am I using the window events feature incorrectly?
Also, if there is an alternative to window events or a another solution that fits better for my problem I’m open to switching directions.
Thanks, Brian _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Fahey Brian wrote: Sounds like you want window-b to basically hold itself on-top of window-a while you in fact have window-a being the focus window. So window-b would be a floating tool-bar type of window. VW does not officially support that kind of window -- although you can get it to happen for "Windows" only setting aBuilder window windowType: #reserved in "postBuildWith: aBuilder". given the name "#reserved" it sounds like cincom need not continue to make it do that, but I bet lots of screams would occur if it stopped working. Re your other issues below, I have never used master/slave, I needed a more complex association so I did my own.
-- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |