Title: Form and Windows names/identifiers Post by: Lu?s T. on October 25, 2017, 01:04:19 pm As far I understand windows and form identifiers must be unique in the scope of the program:
"The form identifier does not need to match the name of the form specification files, but it must be unique among form names in the program. Its scope of reference is the entire program." Suppose I have a CRUD in clients and, while inputting an client, I need to call that same CRUD to get another client (for instance the partner). This will be solvable if the window/form identifier is local to the function. Has anybody already faced this issue? What will be the solution for that? PS: I think the same reasoning can be applied to cursors, which I think are also global identifiers. Title: Re: Form and Windows names/identifiers Post by: Reuben B. on October 26, 2017, 11:07:19 pm A few potential solutions...
Quote Suppose I have a CRUD in clients and, while inputting an client, I need to call that same CRUD to get another client (for instance the partner). Lets say your program is called client_crud. You could write your program in such a way that you can go recursively call that same program from your program and go straight to a particular part of the program e.g....Code
... as it is a seperate instance of the program, you avoid the issue with window/form identifiers. Code
Otherwise a technique I've used in the past is to have a maximum depth of recursion (say 5 or 10) and then in your code Code
... to avoid the horrible duplicate code I would tend to use the pre-processor to avoid typing the duplicate code, something similar to ... Code
Code
Correct. However since 3.00 you can use base.SqlHandle for this. http://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_ClassSqlHandle.html Code
or similar Hope that helps, Reuben Title: Re: Form and Windows names/identifiers Post by: Sebastien F. on October 27, 2017, 09:14:55 am We have often discussed this internally, the feature is identified as FGL-2297
Seb Title: Re: Form and Windows names/identifiers Post by: Lu?s T. on November 06, 2017, 09:36:54 am Thanks for the hints Reuben.
What is "FGL-2297" Sebastien? Title: Re: Form and Windows names/identifiers Post by: Sebastien F. on November 06, 2017, 10:36:56 am FGL-2297 is the identifier of the ticket in our bugs/features database.
See https://4js.com/support/issue/?id=FGL-02297#startissue Seb |