omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Grun6

    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.


    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 22
    • Best 1
    • Controversial 0
    • Groups 0

    Grun6

    @Grun6

    1
    Reputation
    763
    Profile views
    22
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Grun6 Unfollow Follow

    Best posts made by Grun6

    • RE: Nonetype form dialogs returns - varying behavior

      @cvp and @Phuket2 thank you for your responses

      The behaviour was exactly that the form_dialog returned to calling code before it's end when called from the tableview. And the decorator @ui.in_background fixes it.
      Thanks!

      G

      posted in Pythonista
      Grun6
      Grun6

    Latest posts made by Grun6

    • RE: Embedding photo capture in a shield view

      I'm a bit stubborn...and I tried to build a shield view for the take_photo() function to call photos.capture_image()
      And @JonB you are right, capture_image() still cancels the wait_modal() call.

      I am willing to accept this, but question for @omz, is there a reason why photos.capture_image() cancels the wait_modal() call. And is there a way around it?
      Thanks

      AI

      posted in Pythonista
      Grun6
      Grun6
    • RE: Embedding photo capture in a shield view

      thanks for the example, I'll look into it!

      posted in Pythonista
      Grun6
      Grun6
    • Embedding photo capture in a shield view

      Hello,

      I am looking for help in creating a shield view, where a photos.capture_image() call can be made without cancelling the wait modal call of a form dialog container view (for those familiar with the dialogs module).

      This is the solution used for the date picker in the dialogs module.
      Here is a gist to my modified dialogs module:
      https://gist.github.com/368433/312e372196880980eaa5e0867b720672

      I think it would have to go in the take_photo() function but I do not know how to go about it.
      Any help would be much appreciated.

      G

      posted in Pythonista
      Grun6
      Grun6
    • RE: Form_dialog that takes pictures and save locally

      wow. @cvp. I don't know what to say...I've been trying to sort this out for literally three days...
      Thanks so much for looking at it,
      Merry Christmas,
      G

      posted in Pythonista
      Grun6
      Grun6
    • RE: Form_Dialog datetime type with year

      Nice modification @cvp

      posted in Pythonista
      Grun6
      Grun6
    • RE: Form_dialog that takes pictures and save locally

      Notice:

      • the photo type is implemented at line 94
      • the take_photo call is implemented at line 344
      • the rest is pretty much the form_dialog module (I have implemented a segmented type but it has nothing to do with the rest)

      It all works well, but it seems that the capture_image() call changes the self.container_view item

      posted in Pythonista
      Grun6
      Grun6
    • RE: Form_dialog that takes pictures and save locally

      You are right. I thought it would be long here but a gist is perfect:
      https://gist.github.com/368433/043e7e00955b7f880d422d3961a79215

      Also you can use this code for the demo:

      import PhotoDialogs
      
      fields = [{'type':'text', 'title':'First Name', 'key':'fname', 'value':''}, {'type':'photo', 'title':'ID card', 'key':'ID_photo', 'value':''}]
      PhotoDialogs.form_dialog(fields = fields)
      
      

      Notice what happens when you press Done after a picture is taken.

      posted in Pythonista
      Grun6
      Grun6
    • Form_dialog that takes pictures and save locally

      Hello,

      I've been trying for days to do the following, and run into the same NoneType problem. Here is what I am after: in addition to entering text, numbers, checkmarks, and dates in a form dialog, I would like to also take a picture, and store it locally.

      The "picture" row in the form dialog would have two buttons, one to take a picture, and one to show a preview of it. The form dialog return dictionary would return the path to the picture as the value for that given photo row.

      Example:

      fields = [{'type':'text', 'title':'First Name', 'key':'fname', 'value':''}, {'type':'photo', 'title':'ID card', 'key':'ID_photo', 'value':''}]
      dialogs.form_dialog(fields = fields)
      

      And say the user enters "Bob" as first name, and uses the buttons to take a picture that gets stored locally at path pictures/some_unique_id.jpeg
      Then the form dialog would return:

      {'fname':'Bob', 'ID_photo':'pictures/some_unique_id.jpeg'}
      

      In my attempts, I have used the photos module, the capture_image() function to get the image, and the image.save(path) function to save it.

      Any help would be greatly appreciated,
      Merry Christmas to you all,
      G

      posted in Pythonista
      Grun6
      Grun6
    • RE: console.alert makes screen unresponsive when called from within form_dialog window

      Thanks for the suggestions. I will try them !

      posted in Pythonista
      Grun6
      Grun6
    • RE: console.alert makes screen unresponsive when called from within form_dialog window

      Yep I've tried but it pushes the window prompt behind the form_dialog window and makes it unusable.
      Would you be willing to have a look at it, I could send you my files/github repo to run on your side.
      Thanks,
      G

      posted in Pythonista
      Grun6
      Grun6