Help with Touch IDE
-
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):
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.
I guess the reason is pretty simple, but right now, I just don't get it...
Thanks for your help -
@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)
-
@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...
-
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.htmlAlso you can join the App Dev group on telegram:
https://t.me/UbuntuAppDevEN -
@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.
-
@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... -
@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
-
@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 ? -
Hi @Homer3
This is Tide:
https://github.com/fredldotme/Tide?tab=readme-ov-file#tide---the-touch-friendly-ideAn IDE for development of Ubuntu Touch on Ubuntu Touch.