More work.

This commit is contained in:
Pietro Gagliardi 2015-08-07 01:28:26 -04:00
parent 06c88c9d9f
commit 63df1b8e16
1 changed files with 11 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import Cocoa
// auto layout helpers
func tIsAmbiguous(view: NSView, indent: Int) {
var s = string(indent, ' ')
println("\(s) \(view.className) \(view.hasAmbiguousLayout)")
debugPrint("\(s) \(view.className) \(view.hasAmbiguousLayout)")
if view.hasAmbiguousLayout {
view.window.visualizeConstraints(view.superview.constraints)
}
@ -25,6 +25,8 @@ class tWindow : tControl {
backing: NSBackingStoreBuffered,
defer: true)
self.w.title = "Auto Layout Test"
self.c = nil
self.margined = false
}
public func tSetControl(c: tControl) {
@ -44,6 +46,14 @@ class tWindow : tControl {
tIsAmbiguous(self.w.contentView, 0)
}
func tSetParent(p: tControl, addToView: NSView) {
fatalError("cannot call tWindow.tSetParent()")
}
func tFillAutoLayout(p: tAutoLayoutParams) {
fatalError("cannot call tWindow.tFillAutoLayout()")
}
public func tRelayout() {
if self.c == nil {
return