On Nov 25, 2006, at 3:11 PM, Michael Sharpe wrote:
On Nov 23, 2006, at 11:37 AM, Michael Sharpe wrote:
I have a window with a a single editfield, and nothing else. When
the window is called using showmodal, the mousedown never fires in
the editfield. When called with show, it fires normally. More
oddly, if I add a statictext to the window and call the window
with showmodal, the mousedown event refuses to fire until I click
on the statictext box, after which it fires normally in the
editfield for the remaining life of the window. (The window has no
initialization and no other event handling other than in the
editfield.mousedown) It doesn't seem to matter whether the window
is MovableModal or Document. I'm calling it from a document window
which was itself called with showmodal. The really irritating
thing is that when I export the window and replicate the way it
was called in a new program, the mousedown fires normally. Any
ideas about what else to try would be most appreciated.
OK---here's the minimal example that shows this (RB2006r4,
Windows). The bottom line seems to be that it is dangerous to use
showmodal inside a contextualmenu.action event handler, and that
the new style contextual menu is safer in this regard.
New desktop project.
Add new window (as window2).
To window1 add a listbox, and in its Open event add a row.
To window1, add a contextualmenu.
To window2, add an editfield and a statictext.
To the mousedown event of Listbox1, put
If IsContextualClick then
ContextualMenu1.addrow "Open window 2"
ContextualMenu1.open
end if
Contextualmenu1.action should contain
Window2.showmodal
In Window2.editfield.mousedown put
msgbox "Click!"
You will then see the behavior I described. The editfield behaves
normally in all respects, except that the mousedown doesn't fire as
expected until you first click on the statictext.
I'm converting all my contextual menus to the new style to get
around this.
_______________________________________________
Yes, I can confirm that on Windows(2006R2). On Mac it works
correctly. It's a bug in my view. Are you going to report it on
Feedback?
Best,
Jack
_______________________________________________
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>