From 8eb52f9a888c2183b7ee022eb52cea24ce8bb8c8 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Mon, 20 Oct 2014 19:36:48 -0700 Subject: [PATCH] FIXED: Previous commit about explicitely define the observing options broke the abolity to hide buttons in CPButtonBar This patch ensure to correctly set the options --- AppKit/CPButtonBar.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AppKit/CPButtonBar.j b/AppKit/CPButtonBar.j index 4dd9db247..c524a2fcb 100644 --- a/AppKit/CPButtonBar.j +++ b/AppKit/CPButtonBar.j @@ -28,6 +28,8 @@ @global CPPopUpButtonStatePullsDown @global CPKeyValueChangeOldKey @global CPKeyValueChangeNewKey +@global CPKeyValueObservingOptionNew +@global CPKeyValueObservingOptionOld @implementation CPButtonBar : CPView { @@ -137,7 +139,7 @@ for (var i = [_buttons count] - 1; i >= 0; i--) { - [_buttons[i] addObserver:self forKeyPath:@"hidden" options:nil context:nil]; + [_buttons[i] addObserver:self forKeyPath:@"hidden" options:CPKeyValueObservingOptionNew | CPKeyValueObservingOptionOld context:nil]; [_buttons[i] setBordered:YES]; }