Revert "cocoa.touchbar: quick hack to experiment with 1t 0.11 build problem"
This reverts commit 9fbddec50e
.
paths
parent
4883242292
commit
a4f6d43645
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2017 Doug Coleman.
|
! Copyright (C) 2017 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien.c-types cocoa cocoa.classes cocoa.messages
|
USING: alien.c-types cocoa cocoa.classes cocoa.messages
|
||||||
cocoa.runtime combinators compiler.units core-foundation.strings
|
cocoa.runtime combinators core-foundation.strings kernel locals
|
||||||
init kernel locals namespaces sequences ;
|
;
|
||||||
IN: cocoa.touchbar
|
IN: cocoa.touchbar
|
||||||
|
|
||||||
: make-touchbar ( seq self -- touchbar )
|
: make-touchbar ( seq self -- touchbar )
|
||||||
|
@ -21,25 +21,3 @@ IN: cocoa.touchbar
|
||||||
action-string lookup-selector { id { id SEL id id SEL } } ?-> buttonWithTitle:target:action: :> button
|
action-string lookup-selector { id { id SEL id id SEL } } ?-> buttonWithTitle:target:action: :> button
|
||||||
item button -> setView:
|
item button -> setView:
|
||||||
item ;
|
item ;
|
||||||
|
|
||||||
! Temporary hack to support new touchbar API on old macOS build
|
|
||||||
! machines by attempting to re-import the objc-class which
|
|
||||||
! causes re-registering of the objc-methods which were not
|
|
||||||
! present on the macOS 10.11 build machine. We use a flag
|
|
||||||
! to cause this delay only the first time the image is run
|
|
||||||
! and then saved.
|
|
||||||
<PRIVATE
|
|
||||||
SYMBOL: imported?
|
|
||||||
PRIVATE>
|
|
||||||
[
|
|
||||||
imported? get-global [
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"NSCustomTouchBarItem"
|
|
||||||
"NSTouchBar"
|
|
||||||
"NSTouchBarItem"
|
|
||||||
} [ [ ] import-objc-class ] each
|
|
||||||
] with-compilation-unit
|
|
||||||
t imported? set-global
|
|
||||||
] unless
|
|
||||||
] "cocoa.touchbar" add-startup-hook
|
|
||||||
|
|
Loading…
Reference in New Issue