@@ -35,12 +35,14 @@ export class ApplicationDelegate extends NSObject {
3535 toolbar . allowsUserCustomization = true ;
3636 toolbar . autosavesConfiguration = true ;
3737
38- window . toolbarStyle = 3 /* NSToolbarStyleUnified */ ;
38+ window . toolbarStyle = NSWindowToolbarStyle . unified ;
3939
4040 window . toolbar = toolbar ;
4141 toolbar . validateVisibleItems ( ) ;
4242
43- window . makeKeyAndOrderFront ( this ) ;
43+ window . makeKeyAndOrderFront ( NSApp ) ;
44+
45+ NSApp . activateIgnoringOtherApps ( false ) ;
4446 }
4547
4648 applicationShouldTerminateAfterLastWindowClosed ( _sender ) {
@@ -85,7 +87,7 @@ export class SidebarViewController extends NSViewController {
8587 outline . allowsColumnResizing = false ;
8688 outline . allowsColumnSelection = false ;
8789 outline . allowsEmptySelection = false ;
88- outline . rowSizeStyle = 2 /* NSTableViewRowSizeStyleMedium */ ;
90+ outline . rowSizeStyle = NSTableViewRowSizeStyle . medium ;
8991
9092 outline . delegate = this ;
9193 outline . dataSource = this ;
@@ -100,9 +102,6 @@ export class SidebarViewController extends NSViewController {
100102
101103 scrollView . hasVerticalScroller = true ;
102104 scrollView . hasHorizontalScroller = false ;
103- scrollView . borderType = 0 /* NSNoBorder */ ;
104- scrollView . autohidesScrollers = true ;
105- scrollView . verticalScrollElasticity = 2 ;
106105 scrollView . documentView = outline ;
107106 scrollView . drawsBackground = false ;
108107 scrollView . setTranslatesAutoresizingMaskIntoConstraints ( false ) ;
@@ -185,7 +184,7 @@ export class ContentViewController extends NSViewController {
185184 const view = NSView . new ( ) ;
186185
187186 const label = NSTextField . alloc ( ) . initWithFrame (
188- { point : { x : 0 , y : 0 } , size : { width : 390 , height : 100 } } ,
187+ { origin : { x : 0 , y : 0 } , size : { width : 390 , height : 100 } } ,
189188 ) ;
190189
191190 label . stringValue = "Hello, macOS" ;
@@ -208,7 +207,7 @@ export class ContentViewController extends NSViewController {
208207 this . label = label ;
209208
210209 const vstack = NSStackView . alloc ( ) . initWithFrame (
211- { point : { x : 0 , y : 0 } , size : { width : 500 , height : 500 } } ,
210+ { origin : { x : 0 , y : 0 } , size : { width : 500 , height : 500 } } ,
212211 ) ;
213212
214213 vstack . orientation = 1 /* NSUserInterfaceLayoutOrientationVertical */ ;
@@ -257,7 +256,7 @@ export class SplitViewController extends NSSplitViewController {
257256
258257 viewDidLoad ( ) {
259258 this . view . frame = {
260- point : { x : 0 , y : 0 } ,
259+ origin : { x : 0 , y : 0 } ,
261260 size : { width : 800 , height : 600 } ,
262261 } ;
263262
@@ -316,5 +315,4 @@ NSApp.setActivationPolicy(0);
316315
317316NSApp . delegate = ApplicationDelegate . new ( ) ;
318317
319- NSApp . activateIgnoringOtherApps ( true ) ;
320318NSApp . run ( ) ;
0 commit comments