Skip to content

Commit

Permalink
Merge pull request #228 from facebook/evaluateInputExpression
Browse files Browse the repository at this point in the history
Add missing use of fb.evaluateInputExpression()
  • Loading branch information
kastiglione committed Feb 2, 2018
2 parents 22bbd64 + e30ec3c commit 0234972
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commands/FBPrintCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def args(self):
return [ fb.FBCommandArgument(arg='startResponder', type='UIResponder *', help='The responder to use to start walking the chain.') ]

def run(self, arguments, options):
startResponder = arguments[0]
startResponder = fb.evaluateInputExpression(arguments[0])

isMac = runtimeHelpers.isMacintoshArch()
responderClass = 'UIResponder'
Expand Down Expand Up @@ -455,7 +455,7 @@ def args(self):
return [ fb.FBCommandArgument(arg='control', type='UIControl *', help='The control to inspect the actions of.') ]

def run(self, arguments, options):
control = arguments[0]
control = fb.evaluateInputExpression(arguments[0])
targets = fb.evaluateObjectExpression('[[{control} allTargets] allObjects]'.format(control=control))
targetCount = fb.evaluateIntegerExpression('[{targets} count]'.format(targets=targets))

Expand Down Expand Up @@ -485,7 +485,7 @@ def args(self):
return [ fb.FBCommandArgument(arg='object', type='id', help='The NSDictionary or NSArray object to print') ]

def run(self, arguments, options):
objectToPrint = arguments[0]
objectToPrint = fb.evaluateInputExpression(arguments[0])
pretty = 1 if options.plain is None else 0
jsonData = fb.evaluateObjectExpression('[NSJSONSerialization dataWithJSONObject:(id){} options:{} error:nil]'.format(objectToPrint, pretty))
jsonString = fb.evaluateExpressionValue('(NSString*)[[NSString alloc] initWithData:(id){} encoding:4]'.format(jsonData)).GetObjectDescription()
Expand All @@ -511,7 +511,7 @@ def generateTmpFilePath(self):
return '/tmp/curl_data_{}'.format(fb.evaluateExpression('(NSTimeInterval)[NSDate timeIntervalSinceReferenceDate]'))

def run(self, arguments, options):
request = arguments[0]
request = fb.evaluateInputExpression(arguments[0])
HTTPHeaderSring = ''
HTTPMethod = fb.evaluateExpressionValue('(id)[{} HTTPMethod]'.format(request)).GetObjectDescription()
URL = fb.evaluateExpressionValue('(id)[{} URL]'.format(request)).GetObjectDescription()
Expand Down

0 comments on commit 0234972

Please sign in to comment.