Exemplo n.º 1
0
    def add_registration_code(self, code, works_on_instance=True, tail=True):
        """adds the code to the class registration section

        :param works_on_instance: If true, the custom code can be applied directly to obj inst. Example: ObjInst.code
        :type works_on_instance: bool

        :param tail: if True, the custom code is appended to the end of the class registration code.
        :type tail: bool
        """
        if tail:
            self.registration_code_tail.append(user_text.class_user_text_t(code, works_on_instance))
        else:
            self.registration_code_head.append(user_text.class_user_text_t(code, works_on_instance))
Exemplo n.º 2
0
    def add_registration_code(self, code, works_on_instance=True, tail=True):
        """adds the code to the class registration section

        :param works_on_instance: If true, the custom code can be applied directly to obj inst. Example: ObjInst.code
        :type works_on_instance: bool

        :param tail: if True, the custom code is appended to the end of the class registration code.
        :type tail: bool
        """
        if tail:
            self.registration_code_tail.append(
                user_text.class_user_text_t(code, works_on_instance))
        else:
            self.registration_code_head.append(
                user_text.class_user_text_t(code, works_on_instance))
    def add_registration_code( self, code, works_on_instance=True ):
        """adds the code to the class registration section

        works_on_instance: If true, the custom code can be applied directly to obj inst.
        Example: ObjInst."CustomCode"
        """
        self.registration_code.append( user_text.class_user_text_t( code, works_on_instance ) )
Exemplo n.º 4
0
    def add_registration_code(self, code, works_on_instance=True):
        """adds the code to the class registration section

        works_on_instance: If true, the custom code can be applied directly to obj inst.
        Example: ObjInst."CustomCode"
        """
        self.registration_code.append(
            user_text.class_user_text_t(code, works_on_instance))