def _viewControllerDescription()

in fbchisellldbviewcontrollerhelpers.py [0:0]


def _viewControllerDescription(viewController):
    vc = "(%s)" % (viewController)

    if fb.evaluateBooleanExpression("[(id)%s isViewLoaded]" % (vc)):
        result = fb.evaluateExpressionValue(
            '(id)[[NSString alloc] initWithFormat:@"<%%@: %%p; view = <%%@; %%p>; frame = (%%g, %%g; %%g, %%g)>", (id)NSStringFromClass((id)[(id)%s class]), %s, (id)[(id)[(id)%s view] class], (id)[(id)%s view], ((CGRect)[(id)[(id)%s view] frame]).origin.x, ((CGRect)[(id)[(id)%s view] frame]).origin.y, ((CGRect)[(id)[(id)%s view] frame]).size.width, ((CGRect)[(id)[(id)%s view] frame]).size.height]'
            % (vc, vc, vc, vc, vc, vc, vc, vc)
        )
    else:
        result = fb.evaluateExpressionValue(
            '(id)[[NSString alloc] initWithFormat:@"<%%@: %%p; view not loaded>", (id)NSStringFromClass((id)[(id)%s class]), %s]'
            % (vc, vc)
        )

    if result.GetError() is not None and str(result.GetError()) != "success":
        return "[Error getting description.]"
    else:
        return result.GetObjectDescription()