Announcement

Collapse
No announcement yet.

How to save cgi e dat file in separate files for eachForm

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to save cgi e dat file in separate files for eachForm

    Hi,
    Because I've heavy forms, I need to save cgi e dat files separately for each form. I suppose that this could be done creating a project for each form and manually melding the code.
    There isn't the possibility to do it automatically?
    Regards
    Pietro

  • #2
    Hi,



    As far as I know, each project generates a .gci and .dat file
    and separation of each form with separate .gci and .dat files is a bit difficult.

    There is no other way than you mentioned.



    Best regards,
    Kayven

    Comment


    • #3
      Hi Pietro,

      May I know how "Heavy" your forms are and why you'd like to create multiple gci/dat files?

      This forum thread might guide you further.

      Single vs. multiple images per .gci
      https://forum.4dsystems.com.au/node/62827

      Best regards,
      Michael

      Comment


      • #4
        Hi Michael,
        I have thought to have separate files because my program is very big... maybe the choice to use a 4d system module has not been good for my project.
        I have several buttons, some of which allow to access to sub-menus. There are forms that allow to show the status of the system. There are forms the allow to modify several parameters. There are forms that allow to inspect the functionalities of pieces of the system.
        After a while, the program flash memory bank was full. So I had to split the program in two program in different flash banks. But, because I've some configuration and some initialization and some global variable that I can't miss when switch from a program to another, I'had to develop the child program with ViSi environment instead of ViSi Genie. This because ViSi Genie environment doesn't allow to have a program without global variables that can be executed with flash_Exec function. The IDE doesn't manage automatically a program that resides in more than one flash bank. The IDE doesn't manage the visibility scope of globals variables when you manually switch from a program to another. Maybe a lot of the problems, that I've, could be automatically resolved in compilation stage, or maybe they couldn't. In any case, maybe the Workshop IDE was developped for very simple projects and can't solve my problems. Splitting a project into multiple code files is handled in a very embarrassing way. Everything becomes increasingly incomprehensible and less readable as the size of the project increases. It's a real shame, because gen4-uLCD-70DCT-CLB is a fairly powerful module, and complex projects could be implemented, as demonstrated by the fact that I have done what I wanted, even if with considerable complications.
        In the ViSi Enviroment, if you have more than one Form, the code become more complex if you use only a cgi and a dat file for several Forms. Instead, if you have a cgi file and a dat file for every Form, you can switch between Forms simply deleting the handle for the old Form and loading the handle for the new Form.
        Your suggestions will be precious and I hope that in the future you will enhance your IDE.

        Regards
        Pietro

        Comment


        • #5
          Hi Pietro,

          if you have more than one Form, the code become more complex if you use only a cgi and a dat file for several Forms
          I don't really understand what you mean by this.

          As mentioned on the link that I've posted above, using a single gci/dat would use less time and memory.

          At the moment, the details of your poject are very vague to me.

          However, if your problem is that you're running out of program memory, you might want to check out file_Run(); and file_ exec(); functions.

          To explain briefly, these functions would allow you to run 4DGL programs stored on your uSD Card.

          There are sample codes for this on the internal functions manual, this forum thread might also help.

          Parent, Child, file_Exec(), Address_Trap
          https://forum.4dsystems.com.au/node/64208

          Best regards,
          Michael

          Comment

          Working...
          X