Forget my previous email! I just discovered I was doing a very basic mistake: not returning true from the menu handler... now I'm embarassed and mad with me - how could I forget about this one?
So Robert, just place "Return True" on the menu handler. Anyway, why when using a menu shortcut item that does not display a modal window and *without* "Return True" on the menu handler creates the same problem? Carlos On Oct 09, 2006 1:22 AM, Carlos M wrote: > On Oct 08, 2006 10:57 PM, Terry Ford wrote: > > On Oct 8, 2006, at 2:40 PM, Robert Poland wrote: > > > With my learning program, if I have an editfield selected > > > and do a ctrl+o to open another file the o is added to the > > > editfield. This only happens to the PC (XP) and not to the > > > Mac (OS 10.4.8). > > > > > > Any ideas? > > > > Is Control-o a valid shortcut in your project? > > > > I really must get my PC portable up to date to test. It's > > sitting in its bag beside me. Could you send me a simple Rb > > project that duplicates it to test? > > Terry, > > Unfortunately it seems Robert is right! It happens the same with my > projects - what a BIG mess! And this bug also happens with > ComboBoxes. > > I think I'm doing everything right when setting up menu items with > shortcuts. Example: > 1. Create a menu item "Open" and add the "O" key for the shortcut > 2. On the window add a menu handler for the Open menu item and add > for example the following code: > MsgBox "Open" > 3. Add an editifield to a window > 4. Run an use the keyboard shortcut "Ctrl+O" while the focus is on > the EditField. > The letter "o" is added to the editfield. > > It seems this only happens when a modal window is involved with a > shortcut menu item. When using a shortcut menu that do not display a > modal window everything works fine. > > The only workaround I found was to use the following on the > EditField > KeyDown event: > If Keyboard.ControlKey And Key = "o" Or Key = "O" Then > Return true > End If > > But doing this for each shortcut and for each editfiled/combobox is > really [place any nasty word here] - imagine a project with > more than > 20 shortcuts and many editfields/comboboxes :( > > Is there a better workaround? > > The ridiculous is I found that 2005r4 has the same bug and I never > noticed it. Maybe because I never tested my menu shortcuts while the > focus was in an editfield or combobox - it never crossed my > mind that > this kind of bug could happen. > > I found that this bug was reported (vvzfopyj) for Linux on > 2005-10-12 > but couldn't find one for Windows. If I can't find one I'll create a > new report. > > Carlos _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>