• @shinyformica try this, it is the way omz wrote dialog: using wait_modal and resetting the view just after.

    import ui from objc_util import * class Popover(ui.View): def __init__(self, *args, **kws): ui.View.__init__(self, *args, **kws) self.width = 200 self.height = 50 self.label = ui.Label() self.label.text = "test" self.add_subview(self.label) self.label.x = 0 self.label.y = 0 self.label.width = self.width self.label.height = self.height def will_close(self): print("popover closing") class MyView(ui.View): def __init__(self, *args, **kws): ui.View.__init__(self, *args, **kws) self.popover = None self.button = ui.ButtonItem() self.button.title = "Show Popover" self.button.action = self.showPopover self.right_button_items = (self.button,) def showPopover(self, sender): print("show popover") if self.popover is None: self.popover = Popover() self.popover.present(style="popover", popover_location=(self.width-100,50), hide_title_bar=True) self.popover.wait_modal() self.popover = None def run(): v = MyView() v.present('full_screen') if __name__ == '__main__': run()```
  • @cvp Thank you, that did the trick!!!

  • Thank you! This solved the problem. The orientations parameter does appear to be necessary.

  • Did you fix your problem? If not, please post a minimal code example which fails for you. I cannot debug a problem I cannot reproduce!

  • @JonB , yeah I know themes are handled in the editor module. At least for now. Themes are very complex, I know you know. So who knows we're they will end up once @omz thinks about it more. There are so many side effects with themes. Or let's say decisions to be made about implementation/API. maybe it will just stay in the editor module.even On my best day, I am glad it's not me deciding... It's very tricky

Internal error.

Oops! Looks like something went wrong!