Activate Window All
Posted: Thu Apr 01, 2010 8:35 pm
Hello everyone,
I wonder if there are opportunities to enable all forms defined (ACTIVATE WINDOW ALL) but having already active on the main form.
Why this question? Unfortunately it is a little complex to explain (partly because of my bad English
), anyway I'll try.
Three key points:
A) Who has used AS400 and RPG remember that there is a "data dictionary", which may refer to get the look (a mixture of MAXLENGHT and INPUTMASK) for video and table field.
In the forms that I use (limited to alphanumeric TEXTBOX and in particular their property MAXLENGHT), instead of writing the number of characters I added a function. In this way, if you were to change the length, automatically the number of characters will be different without having to revise the form.
es.
B) I use forms with the property NOAUTORELEASE. Before I define them and then I use the command ACTIVATE WINDOW ALL.
C) I built a login system with selection of database (even if working with files. DBF).
The sequence is as follows: when the user activates the program, shows the main form (but others forms have already been defined and enabled), then see a form (MODAL) to request login / database choice. If the user is not authorized, the program stops otherwise open all tables (. DBF) and the user access to various features.
Problem: since the definition of the forms is prior to the opening of the tables, I can not resort to DBSTRUCT() function to know the length of the field and use it for the property MAXLENGHT (infact, I added a function that simulates the DBSTRUCT() but the data are fixed and not retrieved from the table structure).
The solution would be the definition of the forms after tables opening, but if there was the possibility of activating the defined forms having already turned on (only) the main one.
As I reread my post I realize that there could be various obstacles, but I also wanted to ask the question even if my logic seems (is) crazy. Be patient!
Best Regards
I wonder if there are opportunities to enable all forms defined (ACTIVATE WINDOW ALL) but having already active on the main form.
Why this question? Unfortunately it is a little complex to explain (partly because of my bad English
Three key points:
A) Who has used AS400 and RPG remember that there is a "data dictionary", which may refer to get the look (a mixture of MAXLENGHT and INPUTMASK) for video and table field.
In the forms that I use (limited to alphanumeric TEXTBOX and in particular their property MAXLENGHT), instead of writing the number of characters I added a function. In this way, if you were to change the length, automatically the number of characters will be different without having to revise the form.
es.
Code: Select all
DEFINE TextBox prgcodice
PARENT p002win
ROW 60
COL 125
HEIGHT 25
WIDTH 100
ToolTip 'Country Code'
MaxLength p000_LenField ("TabName","FieldName")
UPPER CASECONVERT
OnEnter p002_Enter ()
END TextBox
C) I built a login system with selection of database (even if working with files. DBF).
The sequence is as follows: when the user activates the program, shows the main form (but others forms have already been defined and enabled), then see a form (MODAL) to request login / database choice. If the user is not authorized, the program stops otherwise open all tables (. DBF) and the user access to various features.
Problem: since the definition of the forms is prior to the opening of the tables, I can not resort to DBSTRUCT() function to know the length of the field and use it for the property MAXLENGHT (infact, I added a function that simulates the DBSTRUCT() but the data are fixed and not retrieved from the table structure).
The solution would be the definition of the forms after tables opening, but if there was the possibility of activating the defined forms having already turned on (only) the main one.
As I reread my post I realize that there could be various obstacles, but I also wanted to ask the question even if my logic seems (is) crazy. Be patient!
Best Regards