@cvp I have one last problem that I discovered, when I wanted to chose the year 2018.
If I want to select a date I need to move my finger until I reach the date that I want. As soon as I'm removing my finger from the screen, the year that I selected is saved in the code and the solar system appears.
I can't choose 2018 because when I start the program, I'm directly on 2018 and even if I move to an other year and come back to 2018 nothing happens when I stay on 2018.
Is there a possibility to add an "OK" button that I can press when I choose the year that I wanted?
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Latest posts made by pythonista21
-
RE: Use scene and ui in the same program
-
RE: Use scene and ui in the same program
It works! Thanks a lot for your precious help!!
-
RE: Use scene and ui in the same program
I added this line and replaced all the "d" by "sel_year" in the program but it remains the same. The error is: "can't multiply sequence by non-int of type 'float' " when I try to multiply sel_year. Pythonista still doesn't consider sel_year as a variable. I can't use it as a number and multiply or divide it. I don't understand where the problem comes from 😓
-
RE: Use scene and ui in the same program
It is perfect, I can now choose a year. But there is a last problem, when I use "d" as my date in the program, pythonista tells me that there is an error. Am I not allowed to use d in the program? Is there something else I need to add?
-
RE: Use scene and ui in the same program
The date picker appeared first, it is much better. But the problem is that I did my calculations with years and not with months and days, that's why the date that is given by the date picker can't be used in my program I think, because it can't be converted into years. Do you think that I could only ask the user a year and remove the months and days ?
-
RE: Use scene and ui in the same program
Thank you for your quick answer! I think you correctly understood my question but there is still a problem.
I added your example at the beginning of my program, but the Date picker and the scene that shows the planet are shown at the same time, so I can't choose a date because all the windows are opened at the same time. -
Use scene and ui in the same program
Hello,
I created a scene that shows the solar system. If you choose a date (D=...) in the program, the scene shows you the position of the planets on this date. But, I would like to create an interface where you can ask the user the date he would like to see. I never used the modul ui but I saw that it could be possible thanks to this modul. Could anyone tell me how I could create this ?
Thanks a lot.