@JonB thank you and my apologies but is a gist like get GitHub or is it something else? I'm not familiar with gist and my search on it came back as a vocabulary word not a reference to websites or computer terms.
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.
Posts made by Taje
-
RE: How to save user input from text field and use throughout script with ui?
-
How to save user input from text field and use throughout script with ui?
How do I use the input placed in the ui text field for making decisions, comparisons, and evaluations to determine what the script and ui does next. Thank you.
-
RE: Hard coding ui, gathering and using user input
@ramvee thank you I see the difference and appreciate your post that helps thanks!
-
RE: Hard coding ui, gathering and using user input
@tlinnet thank you I will indeed check it out and try to learn from it.
-
Hard coding ui, gathering and using user input
I find myself lost and in need of help. I've looked through various examples of code that teaches one how to take user input, yet I've noticed they all pretty much use the ui designer. True the ui designer is great, I tend to prefer to hard code mainly to get more experience at being able to code in any interpreter such as the original Python interpreter.
So how do I go about gathering and using user input?
In this one I'm trying to go along with an example i found with-in a form which some questioned how to take input using text field.
# coding: utf-8 import ui w, h = ui.get_screen_size() # action def tex_act(sender): sender.superview["texting"].text # view the_view = ui.View() # text field texting = ui.TextField() texting.frame = (0, 0, 320, 80) texting.placeholder = "Here: " texting.action = tex_act # text view view_text = ui.TextView() view_text.frame = (0, 90, 320, 300) view_text.editable = False # add subview the_view.add_subview(texting) the_view.add_subview(view_text) # present the_view.present("sheet")
Other example of my failure this more so how I'm trying to write my scripts.
# coding: utf-8 import ui def text_field_action(sender): sender.superview = view_text.text def my_views(): # view the_view = ui.View() # text field texting = ui.TextField() texting.name = "texting" texting.frame = (0, 0, 320, 50) texting.placeholder = "here: " # text view view_text = ui.TextView() view_text.name = "view_text" view_text.editable = False view_text.frame = (0, 70, 320, 360) # text action texting.action = text_field_action # add subview the_view.add_subview(view_text) the_view.add_subview(texting) # present the_view.present("sheet") # run main def main(): my_views() if __name__ == "__main__": main()
I truly could appreciate any help, guidance, suggestions, and tips regarding Pythonista, python, and how to properly writing my scripts. As I see many of you have far more experience and greater talent at this than myself. Thank you.