Menu ▾ ▴

.LAYOUT file unnecessary?

Kip
2004-09-02
17 hours ago
  • Kip

    Kip - 2004-09-02

    Does anyone believe that the .LAYOUT file is not needed and could instead be stored inside of the project file?

    Kip

     
    • qWake

      qWake - 2004-09-02

      Well, most everything is not "needed" since there is always more than a single way to achieve a purpose.  I assume that it was convenient to do this since this is what was done.  And the file not in my way so I have no complaint.

      qWake

       
    • Nobody/Anonymous

      Well, I assumed the same. I thought that there must be a reason for this. I cannot think of it. Perhaps you could inform me.

      Kip

       
      • Colin Laplace

        Colin Laplace - 2004-09-03

        Hello,

        If layout information are not stored inside the project file it is because of CVS or source repository programs. The project file would be marked modified whenever somebody changes the cursor position or anything else. People using CVS would generally not add to their source repository the .layout file, and the project file would stay untouched unless a real changes is made to the project.

        Greetings,
        Colin

         
        • Nobody/Anonymous

          Thanks for the clarification Colin.

          Could there perhaps be an option to store the data in the project file? It could be quite simple to implement. You would only have to change the file name of the ini write routine to the project file instead of the LAYOUT file?

          Kip

           
    • qWake

      qWake - 2004-09-02

      No, I cannot inform you since I am not the one who made the design decision.  But as you make me think about it, I might have taken the same approach.  The project file is needed for compilation purposes and it describes the project itself as one unit with its subdivisions.  The layout file contains a type of information of an entirely different nature that deals with the display, so I can see the rationale in keeping it separate.

      qWake

       
    • Nobody/Anonymous

      Well, the project file contains data on the folders to display in the project view. This data is meaningless to the compiler and has no other purpose than for the display.

      Kip

       
    • qWake

      qWake - 2004-09-02

      True.  Nothing is perfect.

      qWake

       
    • Kip

      Kip - 2004-09-03

      Yep. So lets think about this some more and see where this goes.

      Here is a condensed version of a layout file I have from one of my projects:

      [Editor_0]
      Open=1
      Top=1
      CursorCol=1
      CursorRow=9
      TopLine=1
      LeftChar=1
      [Editor_1]
      Open=0
      Top=0
      [Editor_2]
      CursorCol=14
      CursorRow=59
      TopLine=37
      LeftChar=1
      Open=1
      Top=0
      [Editor_3]
      Open=0
      Top=0
      [Editor_4]
      CursorCol=2
      CursorRow=236
      TopLine=218
      LeftChar=1
      Open=0
      Top=0

      The data is already organized by section and key, same as any ini file. All that would need to be done is change the output file in WritePrivateProfileString(), or whatever Delphi API offers, to the project file name. To strip the entries from the project file, simply loop through and enumerate the key string. Just delete each section in each iteration.

      One of the reasons why I like dev is because it can be clean and not make a mess of my project. Every file in the things I build serves a purpose that is immediately obvious to me and somewhat intuitively to others. The only non-code / resource related file in my projects should be the .dev file. To anyone who has used an IDE before, it becomes apparent that surely this must be the project file and contains all information related to organizing the project, in all respects, in one central location.

      What do you think?

      Kip

       
    • Kip

      Kip - 2004-09-03

      *simply loop through and enumerate the key string*

      I mean, "section string," not "key string."

      Kip

       
    • qWake

      qWake - 2004-09-03

      Oh my.  What I think is that it is really unimportant to me if there is a separate layout file or not.  I am content to make use of the tool and be thankful that someone other than myself took the time to create it.  The rest is small stuff and I won't sweat it.

      qWake

       
    • Kip

      Kip - 2004-09-03

      That's all very well, qWake. Hence why I would like to continue helping.

      Right now I am preparing a couple dozen game tutorials for gametutorials.com. These tutorials are for people who are brand new to programming. For guys like us, an ambigious file in a directory may not mean anything. But for a new comer, it can make things very difficult when they are trying to make sense of everything and learn what does what.

      Best to show them how simple, rather than how complicated things can be.

      Kip

       
    • aditsu

      aditsu - 2004-09-03

      the way I see it, the .dev file is essential and only changes when you change the project settings, while the layout file is disposable, and is modified every time you open/close the project
      including it in the dev file would result in changing the dev file every time; this is not good for file comparisons (both date and contents)

      Adrian

       
    • Nobody/Anonymous

      Saving layout data could be optional. Furthermore, the dev file keeps time stamps for the source modules in there already.

      Kip

       
  • Emma Brown

    Emma Brown - 17 hours ago

    Ρε παιδιά, έχω δει ανθρώπους να προσπαθούν να εξηγήσουν το μπλάκτζακ χρησιμοποιώντας καραμέλες αντί για μάρκες. Το αποτέλεσμα ήταν να εξαφανιστούν οι μισές καραμέλες πριν τελειώσει η εξήγηση! 😄 Εγώ χρησιμοποιώ το spinkocasino για online παιχνίδι, αλλά τέτοιες ιστορίες από πραγματικές παρέες έχουν άλλη πλάκα. Τελικά μάλλον είναι καλύτερα να μαθαίνεις τους κανόνες χωρίς φαγητό πάνω στο τραπέζι. Ειδικά όταν υπάρχουν πεινασμένοι στην παρέα!

     

Log in to post a comment.