Hi.
I'm using multiple dialogs in 2.10. I have 2 display arrays in the dialog that need to be inactive until users have fetched some data. Is there a way for me to inactivate the whole array? I have tried to inactivate the fields, but to no avail. I want to prevent the arrays gaining focus if they are empty. Is there a way to achieve this?
Best regards,
-Snorri
Snorri,
I was hoping one of the European based 4Js developers may respond.
In my mind, this is an extension of the issue of how to treat an INPUT ARRAY if no fields are active, do you treat it as a DISPLAY ARRAY and allow access to scrollbars, headers etc. Then the next step is what if you want to make the DISPLAY ARRAY inactive and prevent access to scrollbars, headers. (note: when a TEXTEDIT is inactive you still have access to the scrollbars, but with a DISPLAY ARRAY you may want to prevent access to the scrollbars, particularly with an ON FILL BUFFER array)
It is something that should be considered because with the absence of a LISTBOX widget, one way to emulate a LISTBOX with MD is as
DIALOG
INPUT ...
DISPLAY ARRAY -- listbox field
INPUT ...
and just as you can make a field inactive, it is plausible that you would like to make the listbox inactive (ie make the DISPLAY ARRAY inactive).
Anyway one way to prevent access would be to set TABINDEX=0 for the columns in the DISPLAY ARRAY and then the user won't be able to gain access via tabbing, only via explicitly clicking on the array with the mouse.
You could also try something like ...
BEFORE DISPLAY
IF arr.getLength() = 0 THEN
LET fieldname = FGL_DIALOG_GETFIELDNAME()
CALL DIALOG.nextField(fieldname)
CONTINUE DIALOG
... although I am not sure if it is correct for FGL_DIALOG_GETFIELDNAME() to still return the value of the previous field at this point, and as you have 2 arrays you'd have to handle the case where FGL_DIALOG_GETFIELDNAME() is blank because you have come from the other array. As I said I wouldn't be confident that this behaviour is correct (particularly as DIALOG.getCurrentItem() does return the name of the current array at this point), but it may help you out in the short-term. Maybe there is a need for a DIALOG.getPreviousItem()?
Reuben