Skip to content

visualize in Swift Error #222

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

Open
ghost opened this issue Jan 25, 2018 · 3 comments
Open

visualize in Swift Error #222

ghost opened this issue Jan 25, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 25, 2018

xcode 9, Swift4
in oc ok!

visualize self.view

error: error: use of undeclared identifier 'self'
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 146, in _visualize
    if fb.evaluateBooleanExpression('(unsigned long)CFGetTypeID((CFTypeRef)' + target + ') == (unsigned long)CGImageGetTypeID()'):
TypeError: cannot concatenate 'str' and 'NoneType' objects
visualize `self.view`

error: error: use of undeclared identifier 'self'
visualize 0x7faf6b566d50

error: error: use of undeclared identifier 'CGFloat'
error: use of undeclared identifier 'CGRect'
error: missing '[' at start of message send expression
error: expected ']'
to match this '['
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 152, in _visualize
    _showLayer('[(id)' + target + ' layer]')
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 103, in _showLayer
    width = float(fb.evaluateExpression('(CGFloat)(' + size + '.width)'))
TypeError: float() argument must be a string or a number
@ollieatkinson
Copy link

ollieatkinson commented Feb 21, 2018

I am seeing the same issue:

(lldb) visualize titleView
error: error: use of undeclared identifier 'CGFloat'
error: use of undeclared identifier 'CGRect'
error: missing '[' at start of message send expression
error: expected ']'
to match this '['
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 83, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 178, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 152, in _visualize
    _showLayer('[(id)' + target + ' layer]')
  File "/usr/local/Cellar/chisel/1.7.1/libexec/commands/FBVisualizationCommands.py", line 103, in _showLayer
    width = float(fb.evaluateExpression('(CGFloat)(' + size + '.width)'))
TypeError: float() argument must be a string or a number

I also tested on older version 1.5.0 with the same result.

@kastiglione
Copy link
Contributor

kastiglione commented Mar 6, 2018

The "undeclared identifier CGFloat" bug should be resolved by #232.

@kastiglione
Copy link
Contributor

The "undeclared identifier 'self'" bug should be resolved by #171.

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