-
Notifications
You must be signed in to change notification settings - Fork 801
pkp: po alternative to lookup via valueForKeyPath: #53
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
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
commands/FBPrintCommands.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of self here is misleading. To offer a possible wording:
Print out the value of the key path expression using
-valueForKeyPath:.
|
@KingOfBrian ❤️ it! Thanks for submitting, I have a few comments. |
|
Updated per your comments. I've been waiting for a pkp command for a few months now, but adding a command to lldb directly was a bit intimidating. I was psyched to see chisel and how easy it was to add commands! @adamhrz discovered chisel in a talk at cocoaconf boston. I'm also eyeing an Accessibility helper command, but again, my python's terrible. Will keep it on my mind tho, I have an ugly accessibility issue that it'd help greatly in. |
commands/FBPrintCommands.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a previous commit you had it evaluating object as an expression, before evaluating the -valueForKeyPath:. How come you removed that? It seems useful because it could allow:
pkp [someObject methodTaking:1 and:2].foo.bar.whatever
…t 'key', to allow for some slightly more complex behaviors.
|
Cool, and again thank you! I'll wait a day or two to see if anyone wants to add anything. I'll look at #55 soon too. |
|
🚢 |
pkp: po alternative to lookup via valueForKeyPath:
pkp is a command to print out a key path. LLDB has pretty bad . notation resolution, especially through (id) return results, so I've been using [self valueForKeyPath:@"whatever.keypath.failed.inlldb"] to work around this. This helper makes that very easy!