Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Comments & Feedback
  3. Combine text with variable without combine text behaviour

Combine text with variable without combine text behaviour

Scheduled Pinned Locked Moved Comments & Feedback
7 Posts 4 Posters 1.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KamdroidK Offline
    KamdroidK Offline
    Kamdroid
    wrote on last edited by Kamdroid
    #1

    It would be a real time and behaviour saver if there was an option to e.g. use “{0}” and so on, in some text, and at runtime would convert it to the array item at the index, which would be specified in the set text.

    e.g. Set Label “Label1” to “Hello, {0}. The time is {1}. Today is {2}” using [GetAttr “username”, Get Time: Formatted time, Get Time: formatted date]

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thecheater887
      wrote on last edited by
      #2

      I don't understand why we can't just use the "Add Values" behavior.

      And before you attempt to explain, subtract would remove string B from string A if B is in A, multiply would output the text A repeated by number B, and divide values would take string B out of string A, and create an array containing the text on the left (0), string B (1), and the test on the right (2); if it isn't, just return string A in its own array for uniformity.

      Jack de WildeJ KamdroidK 2 Replies Last reply
      2
      • T Thecheater887

        I don't understand why we can't just use the "Add Values" behavior.

        And before you attempt to explain, subtract would remove string B from string A if B is in A, multiply would output the text A repeated by number B, and divide values would take string B out of string A, and create an array containing the text on the left (0), string B (1), and the test on the right (2); if it isn't, just return string A in its own array for uniformity.

        Jack de WildeJ Offline
        Jack de WildeJ Offline
        Jack de Wilde
        wrote on last edited by
        #3

        @Thecheater887 this would work well with the calculator behaviour mentioned somewhere that would allow multiple maths operations in one behaviour.

        1 Reply Last reply
        0
        • T Thecheater887

          I don't understand why we can't just use the "Add Values" behavior.

          And before you attempt to explain, subtract would remove string B from string A if B is in A, multiply would output the text A repeated by number B, and divide values would take string B out of string A, and create an array containing the text on the left (0), string B (1), and the test on the right (2); if it isn't, just return string A in its own array for uniformity.

          KamdroidK Offline
          KamdroidK Offline
          Kamdroid
          wrote on last edited by Kamdroid
          #4

          @Thecheater887 If there was a “replace text with different text” behaviour that would contradict this idea, as I intended it so everything can be done using one behaviour, rather than multiple combine text or replace text behaviours

          My idea is from C#
          Console.WriteLine(“Hello there, {0}. Here’s information: {1}”, userName, someInformation);

          T D KamdroidK 3 Replies Last reply
          0
          • KamdroidK Kamdroid

            @Thecheater887 If there was a “replace text with different text” behaviour that would contradict this idea, as I intended it so everything can be done using one behaviour, rather than multiple combine text or replace text behaviours

            My idea is from C#
            Console.WriteLine(“Hello there, {0}. Here’s information: {1}”, userName, someInformation);

            T Offline
            T Offline
            Thecheater887
            wrote on last edited by Thecheater887
            #5

            @Kamdroid I don't quite understand what the problem with

            Divide Values ("Hello Cruel World", "Cruel ")
            Add Values (Divide Values[0], "Wonderful ")
            Add Values1 (Add Values, Divide Values[2])

            For a result of "Hello Wonderful World" is.

            Yes, I'm aware I skipped the array logic, I haven't tampered with that yet, but I'm willing to bet it doesn't add much bulk.

            1 Reply Last reply
            0
            • KamdroidK Kamdroid

              @Thecheater887 If there was a “replace text with different text” behaviour that would contradict this idea, as I intended it so everything can be done using one behaviour, rather than multiple combine text or replace text behaviours

              My idea is from C#
              Console.WriteLine(“Hello there, {0}. Here’s information: {1}”, userName, someInformation);

              D Offline
              D Offline
              Deeeds
              wrote on last edited by
              #6

              @Kamdroid So far as I've seen, hyperPad doesn't superficially differentiate between text and numbers, doing that in the background, instead.

              So if you make a storage container of some sort that's got both numbers and text, they're all strings. I think.

              And this is kind of like making a dynamic language (not static) so that users don't need to worry themselves with what "type" of object they are storing with what other types.

              1 Reply Last reply
              0
              • KamdroidK Kamdroid

                @Thecheater887 If there was a “replace text with different text” behaviour that would contradict this idea, as I intended it so everything can be done using one behaviour, rather than multiple combine text or replace text behaviours

                My idea is from C#
                Console.WriteLine(“Hello there, {0}. Here’s information: {1}”, userName, someInformation);

                KamdroidK Offline
                KamdroidK Offline
                Kamdroid
                wrote on last edited by
                #7

                @Kamdroid said in Combine text with variable without combine text behaviour:

                @Thecheater887 If there was a “replace text with different text” behaviour that would contradict this idea, as I intended it so everything can be done using one behaviour, rather than multiple combine text or replace text behaviours

                @Thecheater887 With my idea, all text/word replacement can be done in one behaviour
                Your idea makes it need multiple behaviours to achieve what I want. It’s still a good idea, but I think it shouldn’t replace my idea

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Search