Example #1
0
 def initWithFrame_(self, frame, n):
     self = ObjCInstance(send_super(self, 'initWithFrame:', frame))
     self.n = n
     # set up the angles loop
     step = 2 * PI / self.n
     self.loop = [i * step for i in range(self.n)]
     return self
Example #2
0
    def init(self, app, title, video):
        self = ObjCInstance(send_super(self, 'init'))
#       self = ObjCInstance(send_message('NSObject', 'alloc'))
        self.app    = app
        self.player = vlc.MediaPlayer(video)
        self.ratio  = 2
        self.scale  = 1
        self.title  = title
        self.video  = video  # file name in window banner
        self.window = None
        return self
Example #3
0
 def init(self, app, player, title, video):
     self = ObjCInstance(send_super(self, 'init'))
     #       self = ObjCInstance(send_message('NSObject', 'alloc'))
     self.app = app
     self.NSitem = None  # Play/Pause toggle
     self.player = player
     self.ratio = 2
     self.title = title  # app name, top-level menu title
     self.video = video  # window banner
     self.window = None
     nsBundleRename(NSStr(title))  # top-level menu title
     return self
Example #4
0
 def init(self, app):
     self = ObjCInstance(send_super(self, 'init'))
     self.app = app
     return self
Example #5
0
 def dealloc(self):
     print('dealloc %r' % (self,))
     send_super(self, 'dealloc')
Example #6
0
    def init(self):
        self = ObjCInstance(send_super(self, 'init'))
#       self = ObjCInstance(send_message('NSObject', 'alloc'))
        print('inside init: self = %r' % (self,))
        self.x = 1
        return self
Example #7
0
 def init(self):
     # self = ObjCInstance(send_message('NSObject', 'alloc'))
     self = ObjCInstance(send_super(self, 'init'))
     # print(self)  # <ObjCInstance 0x...: TheDelegate at ...>
     return self
Example #8
0
 def init(self, app):
     self = ObjCInstance(send_super(self, 'init'))
     #       self = ObjCInstance(send_message('NSObject', 'alloc'))
     #       print(self)  # <ObjCInstance ...: _Delegate at ...>
     self.app = app
     return self