Fixed runtime errors. Now to fix bugs!
This commit is contained in:
parent
dbde124471
commit
9aeeeab812
|
@ -7,7 +7,7 @@ import Cocoa
|
||||||
class tBoxContainer : NSView {
|
class tBoxContainer : NSView {
|
||||||
override var alignmentRectInsets: NSEdgeInsets {
|
override var alignmentRectInsets: NSEdgeInsets {
|
||||||
get {
|
get {
|
||||||
debugPrint("in tBoxContainer.alignmentRectInsets")
|
print("in tBoxContainer.alignmentRectInsets")
|
||||||
return NSEdgeInsetsMake(50, 50, 50, 50)
|
return NSEdgeInsetsMake(50, 50, 50, 50)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,9 @@ func main() {
|
||||||
|
|
||||||
var app = NSApplication.sharedApplication()
|
var app = NSApplication.sharedApplication()
|
||||||
app.setActivationPolicy(NSApplicationActivationPolicy.Regular)
|
app.setActivationPolicy(NSApplicationActivationPolicy.Regular)
|
||||||
app.delegate = appDelegate()
|
// NSApplication.delegate is weak; if we don't use the temporary variable, the delegate will die before it's used
|
||||||
|
var delegate = appDelegate()
|
||||||
|
app.delegate = delegate
|
||||||
app.run()
|
app.run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Cocoa
|
||||||
class tSpinboxContainer : NSView {
|
class tSpinboxContainer : NSView {
|
||||||
override var alignmentRectInsets: NSEdgeInsets {
|
override var alignmentRectInsets: NSEdgeInsets {
|
||||||
get {
|
get {
|
||||||
debugPrint("in tSpinboxContainer.alignmentRectInsets")
|
print("in tSpinboxContainer.alignmentRectInsets")
|
||||||
return NSEdgeInsetsMake(50, 50, 50, 50)
|
return NSEdgeInsetsMake(50, 50, 50, 50)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Cocoa
|
||||||
// auto layout helpers
|
// auto layout helpers
|
||||||
func tIsAmbiguous(view: NSView, indent: Int) {
|
func tIsAmbiguous(view: NSView, indent: Int) {
|
||||||
var s = String(count: indent, repeatedValue: " " as Character)
|
var s = String(count: indent, repeatedValue: " " as Character)
|
||||||
debugPrint("\(s) \(view.className) \(view.hasAmbiguousLayout)")
|
print("\(s) \(view.className) \(view.hasAmbiguousLayout)")
|
||||||
if view.hasAmbiguousLayout {
|
if view.hasAmbiguousLayout {
|
||||||
view.window?.visualizeConstraints(view.superview!.constraints)
|
view.window?.visualizeConstraints(view.superview!.constraints)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue