Beispiel #1
0
    def launch_app(self):
        self._impl.create()
        # When click close button, the following code asks before closing the app
        # Modify window on close
        self.main_window.delegate = MyWindowDelegate.alloc().init()
        self.main_window.delegate.interface = self.main_window
        self.main_window.delegate.impl = self.main_window
        self.main_window._impl.native.setDelegate_(self.main_window.delegate)

        appDelegate = MyAppDelegate.alloc().init()
        appDelegate.interface = self._impl.interface
        appDelegate.native = self._impl.native
        self._impl.native.setDelegate_(appDelegate)
        # End modification
        self._impl.loop.run_forever(lifecycle=CocoaLifecycle(self._impl.native))
Beispiel #2
0
    def main_loop(self):
        # Stimulate the build of the app
        self.create()

        self.loop.run_forever(lifecycle=CocoaLifecycle(self.native))
Beispiel #3
0
    def main_loop(self):
        # Stimulate the build of the app
        self.create()

        self.native.activateIgnoringOtherApps_(True)
        self.loop.run_forever(lifecycle=CocoaLifecycle(self.native))