(
            self, aSelector, arg, modes)
Simular to performSelectorOnMainThread:withObject:waitUntilDone:modes:,
        but:

        - always waits until done
        - returns the return value of the called method
        - if the called method raises an exception, this will raise the same
           exception
Simular to performSelectorOnMainThread:withObject:waitUntilDone:modes:,
        but:
Simular to performSelectorOnMainThread : withObject : waitUntilDone : modes : but :
def pyobjc_performSelectorOnMainThread_withObject_modes_(
            self, aSelector, arg, modes):
        """
        Simular to performSelectorOnMainThread:withObject:waitUntilDone:modes:,
        but:

        - always waits until done
        - returns the return value of the called method
        - if the called method raises an exception, this will raise the same
           exception
        """
        result = []
        self.performSelectorOnMainThread_withObject_waitUntilDone_modes_(
            b'_pyobjc_performOnThreadWithResult:',
            (aSelector, arg, result), True, modes)
        isOK, result = result[0]

        if isOK:
            return result
        else:
            exc_type, exc_value, exc_trace = result
            _raise(exc_type, exc_value, exc_trace)
def pyobjc_performSelectorOnMainThread_withObject_modes_ ( self , aSelector , arg , modes ) : result = [ ] self . performSelectorOnMainThread_withObject_waitUntilDone_modes_ ( b'_pyobjc_performOnThreadWithResult:' , ( aSelector , arg , result ) , True , modes ) isOK , result = result [ 0 ] if isOK : return result else : exc_type , exc_value , exc_trace = result _raise ( exc_type , exc_value , exc_trace )