Attached, non-modal forms won't get focus

Author: (Knut)

Hi all, I must be missing something very simple here; A startup shell does an activate to a non-modal, attached (hidden) component. This hidden component activates my main login / config forms (all modal) . Once the environment has been created, I return back to the hidden component and activate my main menu form - a non-modal, attached form to the hidden component. The form reaches the edit statement, the screen becomes visible, and then control returns to the hidden component.... ??? Why? Since the edit statement was executed, and initial form focus is true - shouldn't execution stop here? What am I missing? Knut


  1. Hi Knut, thats exactly the "problem" with nonmodal forms: the edit will not wait until the "structure editor" is terminated by accept/quit/exit as in modal forms and then complete the rest of the exec trigger. So you are immediately executing the rest of the exec trigger and be back on the calling component. Nice day from Frankfurt/Germany, Uli

    Author: ulrich-merkel (
  2. Hi Uli, Well, yes, you're not telling me something I haven't already observed...Confused Since a non-modal form cannot be activated from a modal form, it would imply the 1st component has to be non-modal... I've tried both a non-modal attached and non-modal detached - doesn't seem to make any difference. I've tried setformfocus - no joy.... So, since we do have the ability to have non-modal components - I must be missing something, somewhere, in order to make Uniface activate the structure editor... Any ideas anyone? Knut

    Author: Knut (
  3. set the focus to the non-modal form after you have activated it

    Author: ulrich-merkel (
  4. Hi Knut, try the apstart statement. It does exactly what you want: start the Structure Editor or force Uniface to become interactive. Hope that it helps. Gerton

    Author: Gerton Leijdekker (
  5. This looks like the reported bug 31719 whereby UNIFACE passes the focus to a hidden form.  Title: "Non-modal form grabs focus and does not allow changing focus to other form". What actually happens is that uniface searches for a first promptable field and ignored that the form is hidden in this bug. Meaning that the prompt is on a hidden tab-form and can in certain cases not pulled away by another form. There is a fix coming soon for this  bug31719. Somewhere in or Hope this helps Jasper

    Author: Jasper (
  6. Hi Knut, Is it possible you can get a test set to us? It would be good to know if the fix for bug 31719 does indeed fix your problem. Mike

    Author: Mike Taylor (
  7. Gerton - apstart fixed it! However, I did indeed need to set form focus to the '2nd' form in the stack. Mike - Unfortunately, we seem to be stuck on 9.6.08.... Regards, Knut

    Author: Knut (