On Jul 26, 2006, at 3:05 PM, Sven E Olsson wrote:
On 2006-07-25, at 4:43 PM, Stephen E. Hutson wrote:
Hi Stan,
I was bitten by this, too. I found that subclassing my listboxes,
with the menu handlers in the parent class, solved the problem for
me. I simply defined some Event Definitions that are triggered by
the class's menu handlers, and put the Edit menu code into those
on a listbox-by-listbox basis.
Of course, the listbox now has to have the focus for this to work,
but that works in the case of my apps.
Steve
EditCopy, EditPaste, EditCut ... this menu handlers is not fired
when Copy, Paste and Cut from EditField.
Is this something new? or is it just a new bug in R3?
It's something new. This was an event ordering problem that didn't
make sense. The order of events used to be:
1) Focused Control Menu Handler
2) Window Menu Handler
3) "Parent" window menu handler (in the case of floating windows,
this would be the next non-floating window)
4) App Menu handler
5) MenuItem Action event
6) Intrinsic focused-control menu handler (ie, built-in handler)
This means that if you defined EditCopy on your App class, it would
fire before invoking the default EditCopy behavior for the EditField.
This also produced unexpected results with floating windows, such as
copy/paste causing the EditCopy handler on the document window behind
it to fire rather than simply copying the EditField's text.
The new order is (as documented in the release notes somewhere):
1) Focused Control Menu Handler
2) Intrinsic focused-control menu handler (ie, built-in handler)
3) Window Menu Handler
4) "Parent" window menu handler (in the case of floating windows,
this would be the next non-floating window)
5) App Menu handler
6) MenuItem Action event
So, to override the default copy behavior of an EditField, create an
EditField subclass with an EditCopy menu handler.
HTH,
Jon
_______________________________________________
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>