How to hide a button in NSTouchBar if NSAlert presented?

Hello!

I would like to completely hide all buttons in NSAlert ( and also all buttons that can be shown in NSTouchBar ).

/// Configure TouchBar
/// Configure Alert

// Doesn't work
alert.window.touchBar = MyCustomTouchBar()

alert.runModal()

How to do this?

Thanks!

hide all buttons in NSAlert

Which buttons ? There are only the buttons you define yourself, so why do you add if you want to hide? But how do you expect user to close the alert ?

How to hide a button in NSTouchBar if NSAlert presented?
 
 
Q