UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Help with Touch IDE

    Scheduled Pinned Locked Moved Unsolved Support
    9 Posts 4 Posters 578 Views 2 Watching
    Loading More Posts
    • 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.
      • J Offline
        jojumaxx
        last edited by jojumaxx

        I'm trying to do my first steps with Touch IDE. Though my code should work according to an example, it doesn't. What I have is (screenshot 1):

        touch_ide_1.png

        According to this, the result should be "->text entered in textbox<-"

        But I always get "-><-" (screenshot 2). The content of the text box is never read or extracted.

        touch_ide_2.png

        I guess the reason is pretty simple, but right now, I just don't get it...
        Thanks for your help

        Happily running Ubuntu Touch:

        • BQ Aquaris E5 HD (Retired)
        • BQ Aquaris M10 HD (Retired)
        • Meizu MX4 Pro (Retired)
        • Meizu Pro 5 (Retired)
        • PinePhone UBPorts Edition
        • Volla Phone
        • Volla Phone X
        Schlicki2808S 1 Reply Last reply Reply Quote 0
        • Schlicki2808S Online
          Schlicki2808 @jojumaxx
          last edited by

          @jojumaxx Please leave the "text box 1 -> show" or put this block to the end. Because the first "show" leads to an update of the screen which will kill the value in the "text box" (without 1) 🙂

          H 1 Reply Last reply Reply Quote 0
          • H Offline
            Homer3 @Schlicki2808
            last edited by

            @Schlicki2808
            I have a few more questions regarding Touch IDE:

            • Is there a global scope for objects? So that I can reference UI elements that were created in another function?
            • Do I have to use a for loop to react on user input, or can I use something like callbacks?
            • Can classes/ functions be duplicated ?
            • Can I copy everything in a function to paste somewhere else? Somehow it does not work for 'for' loops...
            AppLeeA Schlicki2808S 2 Replies Last reply Reply Quote 0
            • AppLeeA Offline
              AppLee @Homer3
              last edited by

              Hi @Homer3

              Touch IDE is... (drumroll) ... an IDE.
              Which means, it depends what you want to do.

              If you're making a click app for Ubuntu Touch then it depends on the programming language you're using.
              And instead of listing what can or cannot be done, I'll point you to the documentation which hopefully will give you a better understanding:
              https://docs.ubports.com/en/latest/appdev/index.html

              Also you can join the App Dev group on telegram:
              https://t.me/UbuntuAppDevEN

              H 1 Reply Last reply Reply Quote 0
              • H Offline
                Homer3 @AppLee
                last edited by

                @AppLee noch question it ist a great app,I think it is a huge benefit to develop the app right on your phone. Since I'm new to this I thought I can ask a couple of extra questions, since it was the only thread regarding this app. If Daniel thinks its fairly easy to implement I am happy to help.

                AppLeeA 1 Reply Last reply Reply Quote 1
                • AppLeeA Offline
                  AppLee @Homer3
                  last edited by

                  @Homer3 said in Help with Touch IDE:

                  If Daniel thinks its fairly easy to implement I am happy to help.

                  Oh, so you were asking about how to tweak Touch IDE's code, not about coding something else.
                  Sorry I misunderstood.
                  Then if you want to collaborate to the app, maybe making a change request on Gitlab and comment on what you're struggling to do by yourself.
                  I'm not sure if Daniel come around here frequently or at all...

                  1 Reply Last reply Reply Quote 1
                  • Schlicki2808S Online
                    Schlicki2808 @Homer3
                    last edited by Schlicki2808

                    @Homer3 First of all, sorry for the late reply. Yes, of course, I'm still active and I'm happy if someone uses Touch IDE 🙂 So first of all, regarding your questions:

                    Is there a global scope for objects? So that I can reference UI elements that were created in another function?

                    • Kind of. You can use storage-namespace to transfer information between different functions.

                    Do I have to use a for loop to react on user input, or can I use something like callbacks?

                    • No, callbacks are not available at this time. Indeed, you have to use a loop to constantly check the state off an object.

                    Can classes/ functions be duplicated ?

                    • Not yet. You can create new functions, care for loops and copy the commands between it.

                    Can I copy everything in a function to paste somewhere else? Somehow it does not work for 'for' loops...

                    • Copying a for loop is technically a little bit tricky so I missed out the ability to copy structures like loops, fors and ifs.

                    And some words to Touch IDE itself: some people are comparing it to other IDEs like SeaBass or TiDE. But I think, that's not the right thing. The base concept of Touch IDE is very different to other IDEs available for UT. Touch IDE should be an easy possibility to create apps right on your phone, without the need to have a compiler. It's very more compact and focusses on the things that should make fun. On the other side, it should be and behave like a real programming language for mobile devices.

                    So, If I can help you more, please feel free to ask 🙂

                    Cheers

                    Daniel

                    H 1 Reply Last reply Reply Quote 1
                    • H Offline
                      Homer3 @Schlicki2808
                      last edited by Homer3

                      @Schlicki2808 thanks for the detailed explanations. If I can somehow help in bringing some of the mentioned features to to the app I'd be glad, if you also see them as beneficial. I have some basic QML and javascript, knowledge and intermediate python.
                      P.s. What is TiDE ?

                      AppLeeA 1 Reply Last reply Reply Quote 0
                      • AppLeeA Offline
                        AppLee @Homer3
                        last edited by

                        Hi @Homer3

                        This is Tide:
                        https://github.com/fredldotme/Tide?tab=readme-ov-file#tide---the-touch-friendly-ide

                        An IDE for development of Ubuntu Touch on Ubuntu Touch.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post