(self)
Perform various setup tasks then start application run loop.
Perform various setup tasks then start application run loop.
Perform various setup tasks then start application run loop .
def run(self):
        """
        Perform various setup tasks then start application run loop.
        """
        nsapplication = NSApplication.sharedApplication()
        nsapplication.activateIgnoringOtherApps_(True)  # NSAlerts in front

        self._nsapp = NSApp.alloc().init()
        self._nsapp._app = self.__dict__  # allow for dynamic modification based on this App instance
        self._nsapp.initializeStatusBar()
        nsapplication.setDelegate_(self._nsapp)
        #NSUserNotificationCenter.defaultUserNotificationCenter().setDelegate_(self._nsapp)

        setattr(App, '*app_instance', self)  # class level ref to running instance (for passing self to App subclasses)
        t = b = None
        for t in getattr(timer, '*timers', []):
            t.start()
        for b in getattr(clicked, '*buttons', []):
            b(self)  # we waited on registering clicks so we could pass self to access _menu attribute
        del t, b

        AppHelper.runEventLoop()
def run ( self ) : nsapplication = NSApplication . sharedApplication ( ) nsapplication . activateIgnoringOtherApps_ ( True ) # NSAlerts in front self . _nsapp = NSApp . alloc ( ) . init ( ) self . _nsapp . _app = self . __dict__ # allow for dynamic modification based on this App instance self . _nsapp . initializeStatusBar ( ) nsapplication . setDelegate_ ( self . _nsapp ) #NSUserNotificationCenter.defaultUserNotificationCenter().setDelegate_(self._nsapp) setattr ( App , '*app_instance' , self ) # class level ref to running instance (for passing self to App subclasses) t = b = None for t in getattr ( timer , '*timers' , [ ] ) : t . start ( ) for b in getattr ( clicked , '*buttons' , [ ] ) : b ( self ) # we waited on registering clicks so we could pass self to access _menu attribute del t , b AppHelper . runEventLoop ( )