Open jasperdeb opened 1 year ago
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
could you possibly add a debugger statement in your code and post screenshots of the two call stacks here?
-#new +Aristo3
+#needs-info
Milestone: Someday. Labels: #needs-info, Aristo3. What's next? Additional information should be added as a comment to this isuse.
Both setStyle: and setDelegate: call for the populateButtonBar: method of CPButtonBar. If I set the style before setting the delegate, the buttons are only once loaded. If a delegate is set before the style is set, the buttons are loaded twice.
This is how the buttonbar is created by code
buttonBarDown = [[CPButtonBar alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(bounds)-500-25-25/2, CGRectGetWidth(bounds), 25)];
[buttonBarDown setStyle:CPButtonBarLegacyStyle];
[buttonBarDown setDelegate:self];
[buttonBarDown setAutoresizingMask: CPViewWidthSizable | CPViewMinYMargin];
[contentViewDown addSubview:buttonBarDown];
When setting the buttons in "CPButtonBar 2.0", buttons are loaded twice.
As described in the Wiki by Didier, buttons are loaded in with the delegate populateButtonBar. In the latest version of Didier the buttons are loaded once. In the latest master + A3 branch, items are loaded twice.