Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

presponder is listed in README as supported on OS X, but fails due to UIResponder reference #134

Closed
mattreagan29 opened this issue Jan 4, 2016 · 2 comments

Comments

@mattreagan29
Copy link

presponder is listed in the README as supported on OS X but using on OS X throws an error related to its reference to UIResponder in FBPrintCommands.py

Ex:

(lldb) p (BOOL)[self isKindOfClass:[NSResponder class]]
(BOOL) $3 = YES
(lldb) presponder self
error: error: use of undeclared identifier 'UIResponder'
error: 1 errors parsing expression
Traceback (most recent call last):
  File "/Users/matt/Documents/chisel-master/fblldb.py", line 79, in runCommand
    command.run(args, options)
  File "/Users/matt/Documents/chisel-master/commands/FBPrintCommands.py", line 179, in run
    if not fb.evaluateBooleanExpression('(BOOL)[(id)' + startResponder + ' isKindOfClass:[UIResponder class]]') and not fb.evaluateBooleanExpression('(BOOL)[(id)' + startResponder + ' isKindOfClass:[NSResponder class]]'):
  File "/Users/matt/Documents/chisel-master/fblldbbase.py", line 69, in evaluateBooleanExpression
    return (int(evaluateIntegerExpression('(BOOL)(' + expression + ')', printErrors)) != 0)
  File "/Users/matt/Documents/chisel-master/fblldbbase.py", line 61, in evaluateIntegerExpression
    output = evaluateExpression('(int)(' + expression + ')', printErrors).replace('\'', '')
AttributeError: 'NoneType' object has no attribute 'replace'
(lldb) 

Note: Merely changing or removing the UIResponder reference in FBPrintCommands.py allows the presponder call to work as expected

@kastiglione
Copy link
Contributor

Thanks! Sounds like an easy fix. Pull requests happily accepted 😄

kastiglione added a commit that referenced this issue Jan 5, 2016
Use correct UI/NSResponder class in presponder (fixes #134)
@kastiglione
Copy link
Contributor

Fixed by @kolinkrewinkel in #135.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants