Esempio n. 1
0
        class OCTestObjectProperty2B(NSObject):
            p1 = objc.object_property()

            @p1.getter
            def p1(self):
                return self._p1

            @p1.setter
            def p1(self, v):
                self._p1 = v

            p2 = objc.object_property()

            @p2.getter
            def p2(self):
                return self._p2

            @p2.setter
            def p2(self, v):
                self._p2 = v

            p3 = objc.object_property(read_only=True, depends_on=["p1", "p2"])

            @p3.getter
            def p3(self):
                return (self.p1 or "", self.p2 or "")
Esempio n. 2
0
        class OCTestObjectProperty2(NSObject):
            p1 = objc.object_property()
            p2 = objc.object_property()
            p3 = objc.object_property(read_only=True, depends_on=['p1', 'p2'])

            @p3.getter
            def p3(self):
                return (self.p1 or '', self.p2 or '')
Esempio n. 3
0
        class OCTestObjectProperty2(NSObject):
            p1 = objc.object_property()
            p2 = objc.object_property()
            p3 = objc.object_property(read_only=True, depends_on=["p1", "p2"])
            p9 = objc.object_property()

            @p3.getter
            def p3(self):
                return (self.p1 or "", self.p2 or "")
Esempio n. 4
0
        class OCTestObjectProperty2b(OCTestObjectProperty2):
            p4 = objc.object_property()

            @OCTestObjectProperty2.p3.getter
            def p3(self):
                return (self.p4 or '', self.p2 or '', self.p1 or '')

            p3.depends_on('p4')

            p5 = objc.object_property(read_only=True)

            @p5.getter
            def p5(self):
                return "-%s-" % (self.p4, )

            p5.depends_on('p4')
Esempio n. 5
0
        class OCTestObjectProperty2Bb(OCTestObjectProperty2B):
            p4 = objc.object_property()

            @OCTestObjectProperty2B.p1.getter
            def p1(self):
                return self._p1

            @OCTestObjectProperty2B.p3.getter
            def p3(self):
                return (self.p4 or "", self.p2 or "", self.p1 or "")

            p3.depends_on("p4")
Esempio n. 6
0
        class OCTestObjectProperty7(NSObject):
            p1 = objc.object_property()

            @p1.getter
            def p1(self):
                lst.append("get")
                return self._p1

            @p1.setter
            def p1(self, value):
                lst.append("set")
                self._p1 = value
Esempio n. 7
0
 class OCTestObjectProperty1(NSObject):
     p1 = objc.object_property()
     p2 = objc.object_property(copy=True)
     p3 = objc.object_property(read_only=True)
     p4 = objc.object_property(ivar="myp4")
     p5 = objc.object_property(typestr=objc._C_INT)
     p6 = objc.object_property(typestr=objc._C_DBL)
Esempio n. 8
0
        class OCTestObjectProperty2b(OCTestObjectProperty2):
            p4 = objc.object_property()

            @OCTestObjectProperty2.p3.getter
            def p3(self):
                return (self.p4 or "", self.p2 or "", self.p1 or "")

            p3.depends_on("p4")

            p5 = objc.object_property(read_only=True)

            @p5.getter
            def p5(self):
                return "-%s-" % (self.p4, )

            p5.depends_on("p4")

            @OCTestObjectProperty2.p9.getter
            def p9(self):
                return "+%s+" % (self.p4, )

            p9.depends_on("p4")
Esempio n. 9
0
        class OCTestObjectProperty4(NSObject):

            p1 = objc.object_property()

            @p1.getter
            def p1(self):
                l.append(('get', ))
                return self._p1 + '!'

            @p1.setter
            def p1(self, v):
                l.append(('set', v))
                self._p1 = v + '?'

            @p1.validate
            def p1(self, value, error):
                if value == 1:
                    return (True, value, None)
                else:
                    return (False, 2, "snake")
Esempio n. 10
0
        class OCTestObjectProperty4(NSObject):

            p1 = objc.object_property()

            @p1.getter
            def p1(self):
                lst.append(("get", ))
                return self._p1 + "!"

            @p1.setter
            def p1(self, v):
                lst.append(("set", v))
                self._p1 = v + "?"

            @p1.validate
            def p1(self, value, error):
                if value == 1:
                    return (True, value, None)
                else:
                    return (False, 2, "snake")
Esempio n. 11
0
 class OCTestObjectProperty8 (NSObject):
     p1 = objc.object_property(dynamic=True)
Esempio n. 12
0
            class OCTestObjectProperty10(NSObject):
                p1 = objc.object_property(read_only=True)

                @p1.validate
                def p1(self, v):
                    pass
Esempio n. 13
0
            class OCTestObjectProperty9(NSObject):
                p1 = objc.object_property(read_only=True)

                @p1.setter
                def p1(self, v):
                    pass
Esempio n. 14
0
 class OCTestObjectProperty8(NSObject):
     p1 = objc.object_property(ivar=objc.NULL, read_only=True)
Esempio n. 15
0
 class OCTestObjectProperty7(NSObject):
     p1 = objc.object_property(ivar=objc.NULL)
Esempio n. 16
0
 class OCTestObjectProperty5(NSObject):
     p1 = objc.object_property(read_only=True)
     p2 = objc.object_property()
     p3 = objc.object_property(read_only=True, typestr=objc._C_NSBOOL)
Esempio n. 17
0
 class OCTestObjectProperty3(NSObject):
     p1 = objc.object_property(read_only=True)
Esempio n. 18
0
 class OCTestObjectProperty8(NSObject):
     p1 = objc.object_property(dynamic=True)
     p2 = objc.object_property(dynamic=True, typestr=objc._C_NSBOOL)