Using latest XCode 8.3.
Error in âStruct Circle : Drawableâ
Playground execution failed: error: Shapes.playground:57:22: error: missing argument label âcircle:â in call
context.draw(self)
^
circle:
Should be âcontext.draw(circle: self)â instead of âcontext.draw(self)â.
Correction again⊠so hereâs the problem with thisâŠ
This âcontext.draw(self)â is actually correct⊠only when you get to the Rectangle part since you will now be updating the protocol DrawingContext to below:
protocol DrawingContext {
func draw(_ circle: Circle)
func draw(_ rectangle: Rectangle)
}
So this âcontext.draw(circle: self)â becomes an error in âstruct Rectangle : Drawableâ.
I think you just need to add a notice when the learner is on âStruct Circle : Drawableâ that âcontext.draw(self)â will throw an error since the protocalDrawingContext is still
protocol DrawingContext {
func draw(circle: Circle)
// more primitives will go here âŠ
}
Also, thereâs an exra "" in cy='(circle.center.y)'.
Error in âstruct SVGDocumentâ in this line: âdrawable.draw(context)â. Should be âdrawable.draw(with: context)â.
Playground execution failed: error: Shapes.playground:116:27: error: missing argument label âwith:â in call
drawable.draw(context)
^
with:
Final error: âShapes[26679:700685] Failed to obtain sandbox extension for path=/var/folders/vc/_d1p_t8n1j7g_k25txw3qhr00000gn/T/com.apple.dt.Xcode.pg/containers/com.apple.dt.playground.stub.iOS_Simulator.Shapes-C8B14ED7-522C-4E13-B3D9-8E85B445A645/Library/Caches/com.apple.dt.playground.stub.iOS_Simulator.Shapes-C8B14ED7-522C-4E13-B3D9-8E85B445A645.â.
Add this after âimport PlaygroundSupportâ for the error to go away:
URLCache.shared = URLCache(memoryCapacity: 0, diskCapacity: 0, diskPath: nil)