Chapter 1, Page 32, Typo?

I really didn’t get this paragraph…

The code lines are the same (both use -l swift ???) in the first and the second case - why should there be an different output? And in fact all the lines do not run even with my memory address. I get " "

Enter the following, replacing 0x14bdd9b50 with the memory address of your NSView
subclass you found previously:

(lldb) ex -l swift -o – unsafeBitCast(0x14bdd9b50, to: NSObject.self)
(lldb) ex -l swift -o – unsafeBitCast(0x14bdd9b50, to: NSObject.self) is NSView

These commands print out the SourceCodeEditorView instance, and then check if it’s an
NSView subclass — but this time using Swift! You’ll see something similar to below:
(lldb) ex -l swift -o – unsafeBitCast(0x14bdd9b50, to: NSObject.self)
SourceCodeEditorView: Frame: (0.0, 0.0, 868.0, 524.0), Bounds: (0.0, 0.0, 868.0, 524.0) contentViewOffset: 0.0
(lldb) ex -l swift -o – unsafeBitCast(0x14bdd9b50, to: NSObject.self) is NSView

true
Using Swift requires much more typing. In addition, when stopping the debugger out of
the blue, or on Objective-C code, LLDB will default to Objective-C. It’s possible to alter
this, but this book prefers to use Objective-C since the Swift REPL can be brutal for
error-checking in the debugger.

@lolgrep Can you please help with this when you get a chance? Thank you - much appreciated! :]

This topic was automatically closed after 166 days. New replies are no longer allowed.