• Style Guide

    By Dave Leigh 2 decades ago

    It seems to me that it wouldn't be a bad thing to compile a style guide for VIC. A LOT of the code was done far too quickly the first time 'round and as a result, it badly needs cleaning up. As we do this there will be cases where something's done both the right and wrong way in different places, and new contributors will need to know which is which.



    At some point this can be compiled into a document. This thread can serve in that capacity in the meantime… just reply to this message with new topics to group them together.

    • Subforms = Good

      By Dave Leigh 2 decades ago

      To the maximum extent practical, I want to (continue to) use subforms in VIC.

      A primary reason for this is ease of modification and upgrade.



      For instance, to add document-level security you should, for the most part, be able to drop in a subform with the readers & editors fields, etc.; and an organization that has a specific corporate sales heirarchy can drop a subform containing the required fields into a relationship info tab and be done with it (again, for the most part).



      In some places I neglected to do that (such as the Relationship Info tab, which is now fixed), and those are being corrected. In some other places subforms aren't (yet) used because the fieldnames might be non-standard.



      New subforms should follow the style of the existing subforms. That is, they start and end with hidden text, in pink, such as

      START AddressBusiness SUBFORM

      END AddressBusiness SUBFORM

      It makes them stand out on the form and you know exactly what you're dealing with.

    • Naming Script Libraries

      By Dave Leigh 2 decades ago

      This should go without saying, but the Cratchit* script libraries should be reserved for those functions that are part of the VIC base product. If you modify the scripts for some company-specific use then put your functions in a separate library, It'll make it easier to reapply custom modifications, as they won't get trampled if you attempt an upgrade.

    • Common environment

      By Dave Leigh 2 decades ago

      Take a look at the declarations and initialization in CratchitCommonLibrary before coding LotusScript.

      Chances are, Rob's already set up most of the objects and environment you'll need. UI objects are not declared here so that the library is useable by server agents.