5 Replies Latest reply on Apr 10, 2008 5:48 AM by Newsgroup_User

    text member = field member

    Mike Crisp Level 1
      I am displaying my content as a text member (because I want the on-screen look to be anti-alias) however I am having problems printing (using printomatic) this text as Pom prefers field members.

      I thought I might be able to use the following code to update the content of the fields with the content of the text but no joy... any suggestions?

      member("line.1").text = member("line.1").field
        • 1. Re: text member = field member
          Level 7
          All you need to do is set the field's .text property to the text
          member's .text property.

          member("field").text=member("text").text

          That will only bring in the text, not the formatting. If you need
          formatting as well, then there is a bit more to it.
          • 2. Re: text member = field member
            Level 7
            > All you need to do is set the field's .text property to the text member's
            > .text property.
            >
            > member("field").text=member("text").text
            >
            > That will only bring in the text, not the formatting. If you need
            > formatting as well, then there is a bit more to it.

            You know, one of these days I wish they'd just get around to combining the
            features of Text and Field members into a single type, and then get rid of
            Fields. (Keep the functionality there for legacy projects, but just make it
            so that anything that works on one works on both, and there'd be no need to
            ever use a Field member again.) It really seems redundant to have both, and
            it's rather irritating that you can't use the same lingo to deal with them
            both sometimes.


            • 3. Re: text member = field member
              Level 7
              #text and #field members are very different in many ways, and both bring
              something good to the table.

              #fields are MUCH faster. At least in D10 and below, they used the OS to
              render the text, and generally the visual quality was terrible. They
              are very useful for storing string info that does not need to be
              rendered on the stage, like height maps for 3d terrains, or blocks of
              text that will be used as translations or somehting where the text will
              be broungh from the #field into a #text member for diaply. Their speed
              is a huge asset.

              #text members have all the pretty antialiasing and whatnot to make
              display better, but at the cost of some speed.

              Both have their place. If you are using only display text, then you
              have no real need to use #fields, and that is why they are hidden away
              in the menu system.
              • 4. Re: text member = field member
                Mike Crisp Level 1
                Mike

                Many thanks, worked a treat. Picking up on one of points about retaining formatting - is the complex ?

                I was working on a project recently where I wanted to send a rtf member with formating and using fileio open it and place its contents in various fields reatining the bold etc formatting but also retaining the text inspector hyperlink text (i.e the user opens the file which loads the text - in field A I provide a link to a website using hyperlink text)

                I had now success !!

                Mike
                • 5. Re: text member = field member
                  Level 7
                  #field members have different control schemes than #text members. You
                  can easily set the font, color, style, etc of a whole member. If the
                  whole member needs the same formatting, then it is easy to take what the
                  #text member was set to, and set the #field the same way.

                  If you need more control than that, you will pretty much need to write a
                  script that goes character by character through the #text member and
                  gets the formatting info, then applies it to the #field.