From 06dd84bc69e5f4787d70f9e763cbe303d3273b23 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 27 Jan 2018 10:38:35 -0600 Subject: [PATCH] cocoa: update syntax --- basis/cocoa/touchbar/touchbar.factor | 14 +++++++------- basis/ui/backend/cocoa/cocoa.factor | 12 ++++-------- basis/ui/backend/cocoa/views/views.factor | 2 +- .../ui/tools/listener/completion/completion.factor | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/basis/cocoa/touchbar/touchbar.factor b/basis/cocoa/touchbar/touchbar.factor index a467dc47f6..9ec4a811e2 100644 --- a/basis/cocoa/touchbar/touchbar.factor +++ b/basis/cocoa/touchbar/touchbar.factor @@ -6,18 +6,18 @@ cocoa.runtime combinators core-foundation.strings kernel locals IN: cocoa.touchbar : make-touchbar ( seq self -- touchbar ) - [ NSTouchBar -> alloc -> init dup ] dip -> setDelegate: { - [ swap -> setDefaultItemIdentifiers: ] - [ swap -> setCustomizationAllowedItemIdentifiers: ] + [ NSTouchBar send: alloc send: init dup ] dip send: setDelegate: { + [ swap send: setDefaultItemIdentifiers: ] + [ swap send: setCustomizationAllowedItemIdentifiers: ] [ nip ] } 2cleave ; :: make-NSTouchBar-button ( self identifier label-string action-string -- button ) - NSCustomTouchBarItem -> alloc - identifier -> initWithIdentifier: :> item + NSCustomTouchBarItem send: alloc + identifier send: initWithIdentifier: :> item NSButton label-string self - action-string lookup-selector -> buttonWithTitle:target:action: :> button - item button -> setView: + action-string lookup-selector send: buttonWithTitle:target:action: :> button + item button send: setView: item ; diff --git a/basis/ui/backend/cocoa/cocoa.factor b/basis/ui/backend/cocoa/cocoa.factor index a589dcc486..2bc37fb98c 100644 --- a/basis/ui/backend/cocoa/cocoa.factor +++ b/basis/ui/backend/cocoa/cocoa.factor @@ -76,10 +76,10 @@ M: pasteboard set-clipboard-contents ! after register-window. dup { 0 0 } = [ drop - worlds get-global length 1 <= [ -> center ] [ + worlds get-global length 1 <= [ send: center ] [ worlds get-global last second window-loc>> - dupd first2 -> \cascadeTopLeftFromPoint: - -> \setFrameTopLeftPoint: + dupd first2 send: \cascadeTopLeftFromPoint: + send: \setFrameTopLeftPoint: ] if ] [ first2 send: \setFrameTopLeftPoint: ] if ; @@ -222,13 +222,9 @@ M: cocoa-ui-backend (with-ui) stop-io-thread init-thread-timer reset-thread-timer -<<<<<<< HEAD NSApp send: run - ] ui-running -======= - NSApp -> run + NSApp send: run ] with-ui-running ->>>>>>> origin/master ] with-cocoa ; cocoa-ui-backend ui-backend set-global diff --git a/basis/ui/backend/cocoa/views/views.factor b/basis/ui/backend/cocoa/views/views.factor index 7d9aac0e4e..70be88080f 100644 --- a/basis/ui/backend/cocoa/views/views.factor +++ b/basis/ui/backend/cocoa/views/views.factor @@ -221,7 +221,7 @@ M: send-touchbar-command send-queued-gesture METHOD: Class touchBar: Class touchbar makeItemForIdentifier: Class string [ touchbar-commands drop [ - [ self string CF>string dup string>number ] dip nth + [ self string CFString>string dup string>number ] dip nth second name>> "com-" ?head drop over "touchBarCommand" prepend make-NSTouchBar-button ] [ f ] if* diff --git a/basis/ui/tools/listener/completion/completion.factor b/basis/ui/tools/listener/completion/completion.factor index 1316a3bfb1..274c4d3d3b 100644 --- a/basis/ui/tools/listener/completion/completion.factor +++ b/basis/ui/tools/listener/completion/completion.factor @@ -86,7 +86,7 @@ M: word-completion row-color [ color: dark-gray ] } cond 2nip ; -M: vocab-word-completion row-color 2drop COLOR: black ; +M: vocab-word-completion row-color 2drop color: black ; M: vocab-completion row-color drop dup vocab? [