Advanced Trigger Conditions: Should not be possible to remove the first line

Describe the bug
It's currently possible to remove the first line in the "Advanced Conditions" window for triggers (excepting CAGs) via its "–" button. (I.e. the "All/Any/None" selection.) Doing so causes an exception (see below) and an empty list with no immediate way to re-add a condition. (Though you can do so by closing the windows and re-opening it – it will revert to the default.)

I guess the first "–" button should simply be removed. No point in having no conditions at all. Or if so, there should be a button to re-add one.

Device information:

  • Type of Mac: 2017 MBP
  • macOS version: 12.6.3
  • BetterTouchTool version: 4.069

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

Exception Name: NSInvalidArgumentException
Description: *** -[NSTextView replaceCharactersInRange:withString:]: nil NSString given.
User Info: (null)

0   CoreFoundation                      0x00007ff819e67773 __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007ff819bc7bc3 objc_exception_throw + 48
2   CoreFoundation                      0x00007ff819e675da +[NSException exceptionWithName:reason:userInfo:] + 0
3   AppKit                              0x00007ff81ca54699 -[NSTextView replaceCharactersInRange:withString:] + 256
4   BetterTouchTool                     0x00000001097bdb90 -[BTTTriggerConditionsVC ruleEditorRowsDidChange:] + 297
5   AppKit                              0x00007ff81cbc4df4 -[NSRuleEditor _postRuleOptionChangedNotification] + 109
6   AppKit                              0x00007ff81d12c486 -[NSRuleEditor _deleteSlice:] + 598
7   AppKit                              0x00007ff81ca280ce -[NSApplication(NSResponder) sendAction:to:from:] + 288
8   AppKit                              0x00007ff81ca27f74 -[NSControl sendAction:to:] + 86
9   AppKit                              0x00007ff81ca27ea6 __26-[NSCell _sendActionFrom:]_block_invoke + 131
10  AppKit                              0x00007ff81ca27daf -[NSCell _sendActionFrom:] + 171
11  AppKit                              0x00007ff81ca27cf7 -[NSButtonCell _sendActionFrom:] + 96
12  AppKit                              0x00007ff81ca24b6f NSControlTrackMouse + 1813
13  AppKit                              0x00007ff81ca24436 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 121
14  AppKit                              0x00007ff81ca24306 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 679
15  AppKit                              0x00007ff81ca236d6 -[NSControl mouseDown:] + 678
16  AppKit                              0x00007ff81ca21bc1 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4859
17  AppKit                              0x00007ff81c995d7e -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2582
18  AppKit                              0x00007ff81c99514e -[NSWindow(NSEventRouting) sendEvent:] + 352
19  AppKit                              0x00007ff81c993524 -[NSApplication(NSEvent) sendEvent:] + 352
20  BetterTouchTool                     0x0000000109823d1e -[BTTApplication sendEvent:] + 1373
21  AppKit                              0x00007ff81cc4c18b -[NSApplication _handleEvent:] + 65
22  AppKit                              0x00007ff81c814d3e -[NSApplication run] + 623
23  AppKit                              0x00007ff81c7e8c97 NSApplicationMain + 817
24  dyld                                0x0000000115c2252e start + 462

ah I'll fix that! Unfortunately there is no way to remove the button as far as I know.

1 Like

I thought it must be possible since that's the way it works for CAGs:

It also has no remove button in the second line (first actual condition) until a second condition is added, and the button disappears again when only one condition is left: