Readonly form in dialog

Hello,

I would like to know if someone has seen a situation like I describe now.

I have a field A and field B
field A has a onFocusGained method that shows form X in a dialog

After dialog was closed, the onFocusGained method continues and it will do a fieldB.requestFocus()

field B has also a onFocusGained method that shows form Y in a dialog

What I see is that form Y is loaded in readOnly mode.
And nowhere in my coding, there is coding that makes form Y readOnly

When I show form Y when I press a button, then form Y is shown normally.

It is very complicated to make a small solution that shows the same problem.

That is why I would like to know if someone else already has seen that forms shown in dialog are readOnly.

The problem is also that I can’t reproduce it in debugmode, because in debugmode the next statement after showFormInDialog() is executed.

This is a 3.5.6 issue.

do you do anything with search/find inbetween?

Hi Johan,

Indeed there is a find/search in the onFocusGained of field B just before showing the form in dialog.

Is that problem?

In that case I’ll see if I can replace this coding

Martin

I replaced the coding to the section when I go into edit-mode into my application, so completely outside of the onFocus-methods and show/close dialog, but no difference

Problem still remains

To see it we really need to have a test case then.

I’m not able (yet) to produce a small sample.

But I made another test.

In stead of going directly from field A to field B (with onFocusGained method), I set the focus first on a button that doesn’t have a onFocusGained method.

When doing next field from the button to field B (which has onFocusGained), then the form is not readonly (like expected).

So the problem is:

  • Step into field A
  • Execute onFocusGained of field A
  • In the onFocusGained method there is a show dialog
  • After the dialog was closed, the process returns into the onFocusGained where it showed the dialog
  • Next statement is fieldB.requestFocus(true), where field B also has an onFocusGained method and also shows a dialog (but another dialog)

So it looks like it is caused being in a onFocusGained method and calling another onFocusGained method using requestFocus()

I need this because after closing the dialog, I must move the cursor to the next field. If I don’t use a requestFocus() then the cursor is somewhere undetermined.

and you can do this in a smaller example (or a bit bigger)?
We really need to have a test case that demonstrates this.