>>Well you usually have one caller and many subpanels. Implementing it once in the caller instead of 50 times in each subpanel seems like a lot of time saving to me. It also seems more logical to me to do it in the caller but that may be just my warped mind.
Rolf, I'm surprised by your comment. Usually you are a voice of reason on the info-LV. Think outside the box. We use the GOOP methodology with message passing in our software product. One of the objects is the 'Window_mgr'. The top level caller is merely an event handler that passes events (messages) to the various objects. The object in this case is a VIT that is spawned and 'inserted' in the front panel of the top level VI. We allow our user to add up to four of these processes and have them inserted in the top level VI. The top level VI doesn't really even know that the window is there. All he cares about is processing events and sending out messages. Some messages end up in an instance of the VIT; other messages may invoke the HELP VI to appear. So, a typical sequence of events is: 1) User presses "Add window" button. 2) Top level VI processes event and calls 'Window Manager - Process event' 3) 'Process Event' VI calls method "Window Manager object - Add Window" 4) 'Add Window' spawns a new instance of the VIT. 5) The VIT is a object that self determines that it should be shown as a child window to the Top level VI and it inserts itself. In our design, we created a method called 'Open Window.' This method inserts the caller into the Top level VI. This currently is done using Windows API calls. However, with the new subpanel I got the 1144 error when my VIT tried to insert into the subpanel. I was able to get my VIT inserted into a subpanel with the help of PJM but it only solves half of my problem. (We added the subpanel code to the location where it is spawned.) As you so keenly pointed out, if I only have one caller and many subpanels it is relatively easy to implement it once. However, we currently have 61 User GUIS that use about 15 GUIS repeatedly. I don't want clutter up my GUIS with subpanel stuff. That can be handled by another object very cleanly. My plan was to use a single subpanel and inserted the currently active VI or subVI. However, in order for this to work, the VI itself needs to call my method which removes anything that might be there, pushes it onto the stack, and puts the new caller in the subpanel. Jim West Summitek Instruments
