Announcement

Collapse
No announcement yet.

Avoid recompiling the widgets?

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

  • Avoid recompiling the widgets?

    When using 4D Visi, is it possible to skip recompiling the widgets, if only the source code is changed and not the widgets themselves?
    Currently, what I see is that each and every time also the widgets are recompiled, even if they're untouched.

    This has two disadvantages:
    • each time, you're asked to copy the .cgi and .dat file, while it's unneededit slows down the compilation process, since the widget compilation takes most of the time (in general...)
    Best rgds,
    --Geert

  • #2


    Hmm, yeah, there is code in there that is supposed to already do that, but I've noticed it often doesn't seem to 'work'.



    I'll have a look at it for the next release.



    In the meantime, one of the things that 'triggers' it to regenerate is if the GCI and or DAT files dissapear, so 'cut'ing them to the uSD card will cause this.
    Mark

    Comment


    • #3


      Indeed, if you would "move" the CGI and/or DAT file to the uSD card, then it's obvious the files are regenerated. I assume the build procedure of 4D ViSi follows the same methodology as makefiles do: if an object file is not present, the corresponding c-source(s) (or other source files) are recompiled.
      But in my case, only a "copy" action is done, so the CGI and DAT files remain at their original locations.

      Anyway, I'm looking forward to see that improvement in the next 4D ViSi release.
      Best rgds,
      --Geert

      Comment


      • #4


        Hmm, yeah, there is code in there that is supposed to already do that, but I've noticed it often doesn't seem to 'work'.
        I've seen that some projects never recompile the widgets (at least, if the widgets didn't change) and some project always recompile the widgets.

        When looking at the application which is part of the 4D Visi AppNote 1010 (4D-AN-1010: 4D-ViSi Application Overview, see the AppNote section of the 4D Systems web site), then this project never recompiles the non-changed widgets.

        When I create a new project with widgets myself, then the widgets are always recompiled, whether they're changed or not.

        Maybe that might give you a clue/hint? For me, it's a "mystery"...
        Best rgds,
        --Geert

        Comment


        • #5


          Think I found the reason of the "mysterious" unnecessary recompilation:

          Whenever you even only touch the form of you widget (without changing anything, just giving it the focus), the make mechanisme of 4D ViSi is one way or another triggered to recompile also the .CGI and .DAT files. That doesn't seem logic to me, especially when nothing on the form has been modified...

          It's only until after you press the "Save" button, that you won't see the .CGI and .DAT files recompiled any more. But why? If nothing has changed on the form, why would the make mechanism trigger the recompilation of both the .CGI and the .DAT files?

          Anyhow, I've "found" a workaround by pressing the "Save" button. Shouldn't be, but that's apparently the way it is for the moment...
          Best rgds,
          --Geert

          Comment


          • #6


            Interesting, thanks, I'll use that infomation to start investigating 'why'.
            Mark

            Comment


            • #7


              I've been trying for a while to add more widgets to my usd card. But once the "Windbutton1" is placed, then it is impossible to add more. There is a compiling error related with the .dat file. You get to see this on the attached photo.


              Best regards,
              Jordi Attached files

              Comment


              • #8


                That .dat file looks perfectly valid.

                Of course, why would you be compiling a .dat file, they are read by the program during a file_LoadImageControl() statement?

                Have you tried using one of the ViSi examples (under file, examples), or one of the app notes http://www.4dsystems.com.au/appnotes/

                (If you were looking for the new topic button it's both near the top and the bottom of the subject list when you view a 'sub' forum)
                Mark

                Comment


                • #9


                  I'm not compiling the .dat file itself. That is done automatically when you compile your own project I guess..
                  Am I using correctly the file_LoadImageControl() with the Ihndl pointer? Although I do not believe the problem is related to the main program but to the .dat file...

                  Best regards,
                  Jordi Attached files

                  Comment


                  • #10


                    Um, not AFAIK.

                    Have a look to see if you have inherited the .dat file, and then get rid of it.
                    Mark

                    Comment


                    • #11


                      That's it. It's ben a while since I last modified the inherited files..
                      Thank you very much,
                      You've been really helpful,

                      Best regards,
                      Jordi.

                      Comment

                      Working...
                      X