Announcement

Collapse
No announcement yet.

Visi questions

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

  • Visi questions

    Having played with Visi for a while, I have compiled a few questions:

    Strings object. If you set the background to white and the text to black that is fine however if you the remove the opaque flag so they are transparent, the hatched background is black with grey lines so you can't read the text in the editor since that is also black - could that be altered?

    Why does it bother writing data to the SD card when there are errors?

    Would it be possibie to show a grid and snap widgets to the nearest grid point when placing?

    Is there a way to duplicate a widget - e.g. to copy and paste rather than having to configure the same properties each time another one is required?

    Is there a way to measure the width of a string before printing it so that it can be centred?

  • #2
    We'll see what can be done about the transparent Black on White issue.

    The process of building the code is done in two separate parts, first the visual stuff is built, this generates the constant file that is needed to for the compile. Then the compile is done. So the visual part of the build must be done first and cannot possibly know that the compile will fail.

    That is on the 'to do' list.

    ^C and ^V will copy and past a widget, just select the required object in the object inspector

    strwidth()
    Mark

    Comment


    • #3
      Thanks Mark.

      Originally posted by ESPsupport View Post
      The process of building the code is done in two separate parts, first the visual stuff is built, this generates the constant file that is needed to for the compile. Then the compile is done. So the visual part of the build must be done first and cannot possibly know that the compile will fail.
      Could it not simply build the visual stuff but then wait until after the compile before writing to the SD card then if the compile fails, not write anything.

      Comment


      • #4
        No, as I said "this generates the constant file that is needed to for the compile"

        Why is this such an inconvenience, usually it is quite fast, if there is a large video or something similar involved you can temporarily replace it with a small one.

        Also, you can skip the copy step if you are confident nothing of consequence has changed.
        Mark

        Comment


        • #5
          Originally posted by ESPsupport View Post
          No, as I said "this generates the constant file that is needed to for the compile"
          Sorry, I don't think I am being clear. I realise that it has to generate the constant file each time but surely it is not necessary to copy it across to the SD card immediately - it could be copied across after the compile if the compile is successful.

          Originally posted by ESPsupport View Post
          Why is this such an inconvenience, usually it is quite fast
          It's not a big inconvenience, and it is reasonably fast. I was just trying to think of a way to reduce SD card writes to prolong life. It is not a major problem though...
          Actually it is more of a problem in VisiGenie than Visi.

          Originally posted by ESPsupport View Post
          Also, you can skip the copy step if you are confident nothing of consequence has changed.
          Fair point, I'd not tried clicking the "No Thanks" button before in case it stopped the process alltogether.

          Regarding ^C and ^V, that does work for widgets within a form. Is there a way to duplicate an entire form?

          Regarding strwidth(), can you clarify something?

          If for example I have a string which I want to appear as three lines e.g. "This is\r\na\r\nline", if I use strwidth() on that, am I right in thinking that it would tell me the width of the string assuming it was all on one line or would it give me the length of the longest line?

          I need effectively to centre those lines both vertically and horizontally on a button.

          Comment


          • #6
            Right, I get you now. It's an idea, but really I wouldn't be too worried about wearing out an SD card, it's not that easy.

            Sorry, no current way to duplicate a form, you can edit the control file (.4DViSi) as a text file and duplicate an entire form that way, Just make sure you have a backup and rename everything so there's no duplicates.

            strwidth will give you the width of the widest line, but really that wouldn't help you as you need to centre each line individually, so you will need to get the with of each line and draw them one at a time.
            Mark

            Comment


            • #7
              Originally posted by ESPsupport View Post
              you can edit the control file (.4DViSi) as a text file and duplicate an entire form that way, Just make sure you have a backup and rename everything so there's no duplicates.
              Excellent, that will work for me :-)

              Originally posted by ESPsupport View Post
              strwidth will give you the width of the widest line, but really that wouldn't help you as you need to centre each line individually, so you will need to get the with of each line and draw them one at a time.
              Ok, that's good to know - it may be acceptable to just centre the longest line so that could work too. Failing that, I'll break into lines and centre each.

              Comment

              Working...
              X