Combo box and Button question

In the ComboBox class we have:

setSelectedId(newItemId, dontSendChangeMessage=false)

but in the button class we have

setToggleState(shouldBeOn, sendChangeNotification)

I just got tripped up by this, assuming that these calls were similar. That is, that passing false as the second parameter to both would prevent messaging from happening. Is there a reason for the difference?

For what it’s worth, having the parameter be negative requires a little extra thought. (Don’t Don’t send the change message = do send?) I prefer the affirmative version in the button class.

Is it too late to make parameters like this uniform, so that passing true or false has the same effect for all set state functions?

yeah, i asked for a normalization of the “sendMessage/dontSendMessage” flag some times ago. i think Jules don’t want to change things cause it will cause troubles to the people…

I just had the same issue with ComboBox some weeks ago causing flickering because a notification was sent when I thought it wouldn’t… :slight_smile:

Yeah, that’s one of the few bits of the code that I’m annoyed with myself about. It’s also a tricky one to change though. Probably at some point I’ll change the method name or something to force people to update any uses of it to be consistent, but it’ll be irritating to do.