Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Embedded forms and dialog_box

I'm launching a dialog_box from a form set in a panel. When I use end_dialog, the returnval doesn't return to the calling routine.
If I run the embedded form just on its own and then launch the dialog_box everything works as expected.
Any thoughts as to where my retval may be getting lost once the form is in a panel?

Comments

  • Are you absolutely sure that Dialog_Box hasn't already returned prior to using End_Dialog? That is, are you sure your dialog form is running as a modal form?
  • Perfect Don.
    When calling dialog_box I was passing the name of the embedded form as the parentID. Still launched and appeared to work exactly the same except for the non returning value.
    If I call dialog_box passing the parent of the embedded form, ie the form that has the panel as the parentID the result is returned.

    So I guess that means that an embedded form loses it's right to parenthood and dialog_box whilst appearing to work, loses its modality.

    Thanks for the prompt.
  • I'm not exactly sure of the cause, but I recognized the symptom. I imagine this is happening for the same reason that MDI Children are not supposed to be the parent of modal processes.
  • Probably not surprisingly but just found this applies to OI message boxes as well that are of type Response.

    The response won't be returned unless you pass the name of the window that contains the panel as the parent even if it is a function of the embedded form that is triggering the OI message.
  • Correct...not surprisingly because OI message boxes are just forms called via Dialog_Box and closed with End_Dialog.
Sign In or Register to comment.