• resserone13

    @cvp @ccc @mikael Here is the UI version of the personal protective equipment app. It looks kind of plain. Any suggestions to spruce up how it looks?

    https://github.com/resserone13/PPEasy-ui-only

    posted in Pythonista read more
  • resserone13

    Thanks @cvp @ccc and @mikael for the help. I was able to get past the hang up and move forward on the app development. I ended up using @ccc suggestion because i was using code very similar to what I already had. I’m finishing up a few more things then I will post on GitHub.

    
        def add_btn(self, btn_names, actions_list):
            for i, (n, a) in enumerate(zip(btn_names, actions_list)):
                btn= ui.Button()
                btn.background_color=btn_clr
                btn.title=n
                btn.font=(btn_fnt, btn_txt_sz)
                btn.tint_color=txt_clr
                btn.border_width=2
                btn.border_color=txt_clr
                btn.frame=(width * 0.15, height * (0.12 + i * 0.1), width * 0.7, height * 0.05)
                btn.corner_radius= btn_corner_radius
                btn.action=a
                self.add_subview(btn)
    
    

    posted in Pythonista read more
  • resserone13

    I have a for loop that loops over btn names and creates a button for each name. How do I make it loop over a list of btns and a list of actions so that the each button gets a name and an action?
    I’m using enumerate to help space the btns out. I tired switching to zip but then I loose the i variable for the enumerate function?

    
        def add_btn(self, btn_names, actions_list):
            for i, name, a in enumerate((btn_names)):
                btn= ui.Button()
                btn.background_color=btn_clr
                btn.title=name
                btn.font=(btn_fnt, btn_txt_sz)
                btn.tint_color=txt_clr
                btn.border_width=2
                btn.border_color=txt_clr
                btn.frame=(width * 0.15, height * (0.12 + i * 0.1), width * 0.7, height * 0.05)
                btn.corner_radius= btn_corner_radius
                btn.action='?????'
                self.add_subview(btn)
                
    
    

    posted in Pythonista read more
  • resserone13

    Creat ui objects. then set the parameters to that object. Present the objects using. View. Present().

    posted in Pythonista read more
  • resserone13

    @cvp. Thanks for all your input and advice. I am reviewing everything and re-writing the script. Hopefully everything will be functions. I am going to try classes as well but I might have mainly functions. I’m going to work on it and I will keep you updated. Thanks for all your help it’s really allowing me to get a lot done and learn a lot. Hopefully when I keep showing you these updates you’ll see that I’m learning from what you’re showing me.

    posted in Pythonista read more
  • resserone13

    @mikael I just have my iPhone 11 with Pythonista. I don’t know if I have ui3. I’ve had trouble using stash to import and pip install modules. The web view is working OK for me. I just need to add some navigational buttons at the top. But it does look nice. I will probably have questions on objc In the near future. Once I figure out UI I will dive into objective c.

    posted in Pythonista read more
  • resserone13

    @cvp said:

    @resserone13 did you try my code to open a web view?
    Yes I got the web view working. Thanks.

    posted in Pythonista read more
  • resserone13

    @cvp the imported file ppeasy_text.py is in the same folder as the main.py file.

    from ppeasy_text import text
    
    

    posted in Pythonista read more
  • resserone13

    @resserone13 I would like them to be directed to the website in Safari.

    posted in Pythonista read more
  • resserone13

    @cvp page_info() is like any_scene() class I used when I made the app with scene. I modeled page_info() after any_scene(). Page_info() is a generic function to display the page. Kinda like your myview().

    I’ve also created make_btn() and make_title() for making buttons and creating titles.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!