omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    UI elements in modal scene

    Pythonista
    ui module scene
    2
    2
    2574
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • glitchassassin
      glitchassassin last edited by glitchassassin

      I am having difficulty adding a ui.View to a modal subclassed scene.

      When the scene is run directly, I can add the view in the scene's setup() method to the scene's view property. However, if the scene is run as a modal scene, its view property is None.

      That's not too big a deal. I can just run the modal scene and then trigger the ui.View to be added after it's being presented. But where should the ui.View be added? I can add it to the parent scene's view, but then it doesn't disappear when the modal scene is dismissed.

      How should this work?

      Here's a gist with what I have with so far (main application logic redacted).

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        Perhaps you want to be presenting a modal view, not a modal scene?
        For instance, present your login view as a popover or sheet, then wait_modal on the view to wait until it is closed.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors