Announcement

Collapse
No announcement yet.

Writing to Inherent LabelB Object

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Writing to Inherent LabelB Object

    I've just recently updated my Workshop4 IDE and have been exploring the new widgets and objects available for a Diablo16 display. I have PRO and I'm running working on a Visi Genie project, and I'd like to write a value into an Inherent LabelB object the same way that can be done over serial, but I'd like to do it in a MagicEvent or code snippet. I can't find any documentation for what function to call to achieve this behavior.

  • #2
    Hi,

    Welcome to the forum

    This is the magic code snippet to write a text array to the label

    WriteObject(tiLabelB, 0, labtext);

    I created the text array like this

    var labtext[6] := ['h', 'e', 'l', 'l', 'o', 0];

    I hope this helps

    Best regarfds

    Paul

    Comment


    • #3
      Thank you Paul, that does exactly what I'd expect.

      I'm a bit stuck again on some other behavior that's not what I expected. I am writing a text array to the label in a code snippet, exactly as you have shared here, on Form0. When I change to Form1 and then later return to Form0, the label now says "hlo0000" instead of saying "hello". I'm not sure how to troubleshoot this.

      Comment


      • James_4DSystems
        James_4DSystems commented
        Editing a comment
        We are investigating this now - thank you for reporting it

    • #4
      Please unzip the attached and replace the existing file in C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\INCLUDE

      Then use the 'Load Inherents into Bank 5' tool to update your display
      Attached Files
      Mark

      Comment


      • #5
        Thank you for the quick response and providing this file. I have been using the inherent labels extensively over the last few days and everything has been working as I would expect.
        Last edited by alivings; 8 August 2020, 04:48 AM.

        Comment

        Working...
        X