MDI Child Events (OpenInsight Specific)
At 20 FEB 2001 06:27:09PM Steve Botes wrote:
I have been having a problem with the menus on MDI child windows not executing. I have narrowed it down to the following sequence. If I create a window with no menus save it and then at a later point add menus they do not execute. They properly replace the menus on the MDI frame but don't work. Step two, I take the exact same window that doesn't work and save it with a name variation like trips saved as tripsts then all of the menu entries work just fine.
This is the fourth window that I have had to do this to as a work around. Can someone help me figure out what is keeping the menu items from firing. They don't seem to even start. At least nothing registers on the system monitor.
At 21 FEB 2001 05:13AM Oystein Reigem wrote:
Steve,
You say it helps to rename the child. But what happens if you rename it back to the original name? Do the menus stop working again?
You say the problem occurs when you start with a child that contains no menus. What if you let the child have one single dummy menu with one single dummy item, without any event? I.e, one menu and item with no real purpose, that you can remove later. Is this enough to get the added menus to work?
A question in the not too well founded category: Is there anything all your menu items have in common (the ones that don't work)? E.g, are they all for standard stuff like read row, save row, clear, etc? Do they all have accellerator keys? Etc.
Have you done a Scan_Rep? (You asked for help on this in December, on the Works list, and WinWin suggested you did a Scan_Rep.)
- Oystein -
At 21 FEB 2001 09:38AM Donald Bakke wrote:
Steve,
We don't add menus to our child windows so this is a mystery of us. Have you compared the template record of your original and saved-as windows to see if there are any significant differences? I wonder if the menu structures are getting reorganized in a way where one works and another doesn't.
At 21 FEB 2001 03:46PM Steve Botes wrote:
You say it helps to rename the child. But what happens if you rename it back to the original name? Do the menus stop working again?
I tried this and yes they did stop again. I even tried it after deleting the original and then renaming to the original name. Keep in mind that I made no changes to the window except renaming it - both times.
You say the problem occurs when you start with a child that contains no menus. What if you let the child have one single dummy menu with one single dummy item, without any event? I.e, one menu and item with no real purpose, that you can remove later. Is this enough to get the added menus to work?
I haven't tried this. It kind of falls into the same category as renaming it. I have a workaround. However, if it helps figure out what OI is doing I am all for it.
A question in the not too well founded category: Is there anything all your menu items have in common (the ones that don't work)? E.g, are they all for standard stuff like read row, save row, clear, etc? Do they all have accellerator keys? Etc.
This is a good question but one that I have looked at. I have even tried this with removing all of the menu items but one. That one is just close, a quick event sending close to @window. Yes it has an accelerator key. I have tried launching the menu items using both a key and selecting the menu directly.
Have you done a Scan_Rep? (You asked for help on this in December, on the Works list, and WinWin suggested you did a Scan_Rep.)
Yes, I have. It would be interesting to see if you can actually duplicate the problem. I create a window with no menus. I presume that there are none in the template because none appear in my new window. I save it add all the controls and event handlers and then as I finish I go to add menus. It is at this point after I save the window with the menus that they just flat out don't fire. They do replace the ones in the MDI frame but don't fire.
One thing, I am working with Win 2000.
At 21 FEB 2001 03:53PM Steve Botes wrote:
Don,
To the best of my ability, I have compared everything that I can find. I have looked extensively through the repository, but do run into some limitations as to how the menus are launched. What I did was try to compare those that worked with those that didn't. I didn't have much luck in knowing what to look for.
Thanks
At 21 FEB 2001 04:25PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
OK Steve
We've just done exactly what you have described and experienced no problems. So a couple of things spring to mind :-
When you save as, the compiler will reevaluate all of the Parent Window properties and set them to the proper parent, this may explain it. As a matter of practice when we create a new form we save it immediately before adding controls to ensure that the main window control has a name - this stops controls being assigned a parent of "UNTITLED".
What is the nature of the menu items? Are they quickevents or code? Do they send to @Window or @MDIActive?
If the worst comes to the worst we'll look at this for you but we should be able to get to the bottom of it.
World Leaders in all things RevSoft
At 21 FEB 2001 04:28PM Donald Bakke wrote:
Steve,
I've come across problems where one hex value was modified in the template record and it stopped the whole ball of wax. That's when I started checking the window source if all else fails.
At 22 FEB 2001 03:37AM Oystein Reigem wrote:
Sprezz,
When you save as, the compiler will reevaluate all of the Parent Window properties and set them to the proper parent, this may explain it. As a matter of practice when we create a new form we save it immediately before adding controls to ensure that the main window control has a name - this stops controls being assigned a parent of "UNTITLED".
This can't be the explanation here since the menus of Steve's child window stop working again when he renames the child back to the original name.
Or have I overlooked something?
- Oystein -
At 22 FEB 2001 04:03AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group</A wrote:
Nope Oy, just covering all the bases .
World Leaders in all things RevSoft
At 22 FEB 2001 04:31AM Oystein Reigem wrote:
Steve,
Very puzzling indeed.
If you can whittle your malfunctioning stuff down to something that fits in a check-out and can be tested on somebody else's system, I'm willing to be that somebody. And so is Sprezzatura it seems.
My computers run 98SE, ME and NT4, though. None with 2000, in case you suspect it's got something to do with that version of Windows. Have you got a chance yourself to run the thing on a different system?
Now I can't claim to have a very broad experience with MDI. I use MDI heavily in my newest app, but without much variation. E.g, all my child windows are without menus. When different child windows need different menus the app changes the frame's menus on the fly. E.g, I have only one child open at a time. E.g, all my frames are instances of the same one.
What's the simplest version you've got of this malfunctioning frame and child? A child with just one menu and item, with a standard Close quickevent like you described?
Does the Close work if you run the child by itself, i.e, not from the frame?
(Btw - how many child windows are active?)
In the Menu Builder window (Menu | Design from the Form Designer) there are many "Styles" settings. I've never used them myself, so I ask out of ignorance: Have you ticked any of these in either your frame or your child?
- Oystein -
Øystein Reigem,
Humanities Information Technologies,
Allégt 27,
N-5007 Bergen,
Norway.
Tel: +47 55 58 32 42.
Fax: +47 55 58 94 70.
Home tel/fax: +47 56 14 06 11.
At 22 FEB 2001 07:20PM Steve Botes wrote:
Everyone…
The menu on my classes form is really pretty simple.
It has a file, edit and reports item
Under file, I have save, delete, clear, close. They all send a message to @Window such as Send Clear to @Window. I am using quick events. I also have one that sends OPTION to @Focus. All are tied to different accelerator keys. ALL do not work. It is as if the menu isn't even there. I have also confirmed Oystein's question about saving the working one as the orginal one that wasn't working. Example, the form is named CLASSES. When saved as CLASSES it doesn't work. When saved as CLASSESTS it works fine. That seems to indicate that it is tied to the orginal name and something that was created when the orginal form was created without menu's
At 22 FEB 2001 07:28PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
@Window (when promoted to the frame) == the frame. Use @MdiActive.
World Leaders in all things RevSoft
At 23 FEB 2001 12:44PM Steve Botes wrote:
I am using quick events and on the write it only allows me to use @Window. The options I am using @Focus. And @Window works when the window is renamed. I have tried using @MDIActive in a script but the script doesn't execute. I put a debug in it.
At 23 FEB 2001 12:49PM Oystein Reigem wrote:
Steve,
Select the General QuickEvent Option. Gives you more freedom.
- Oystein -