[Oberon] Focus management in WMEditors

Dan Parnete dan.parnete at fastwebnet.it
Thu Apr 14 20:38:58 CEST 2005


Hi Thomas,

I will became mad with this focus. I have created a Field object as an 
extension of WMEditors.Editor, and I'm using it for building forms. The 
initialization is:
    multiLine.Set(FALSE);  takesFocus.Set(TRUE);  tv.needsTab.Set(FALSE);
Let suppose we have field1 and field2 in a form (Panel), in this exact 
order. I put the focus on field1 by pointing with the mouse. The red 
cursor indicates the focus, and the editor works fine. When I push the 
TAB key, the field1 should lose the focus, and the field2 should catch 
it, as the next component that accepts focus. But this didn't happens. 
The cursor rests on field1.
I have trace the focus chain (enabled TraceFocusChain) and write more 
tracing code to see what happens. It looks normal. The FocusNext finds 
the field2 and calls his SetFocus method. The old chain form..field1 is 
deleted and the new form..field2 is created. The FocusLose of the field1 
and FocusReceived of the field2 are called, but the cursor rest on filed1.
It must be something I don't understand here, even if I looked 
WMComponents, WMTextViews and WMEditors a 100 times.

Thank you,
Dan Parnete



More information about the Oberon mailing list