# ComboBox setSelectedId update parameter

**URL:** <https://forum.juce.com/t/combobox-setselectedid-update-parameter/3618>\
**Category:** General JUCE discussion\
**Created:** [February 2, 2009, 8:38pm UTC](https://forum.juce.com/t/combobox-setselectedid-update-parameter/3618 "2009-02-02T20:38:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [February 2, 2009, 8:38pm UTC](https://forum.juce.com/t/combobox-setselectedid-update-parameter/3618/1 "2009-02-02T20:38:33Z")

</div>

Is it just me or do i see that all component have a

```auto
sendChangeMessage = true
```

and combo has

```auto
dontSendChangeMessage = false
```

could this be consistent across components, i just spent an hour trying to figure out what’s zeroing my parameters. perhaps there is a reason for this i don’t understand ?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [February 3, 2009, 11:43am UTC](https://forum.juce.com/t/combobox-setselectedid-update-parameter/3618/2 "2009-02-03T11:43:05Z")

</div>

Yes… I know about that, to my shame. They’re both very old methods that I happened to write in an inconsistent way, but now that there’s tons of code out there using them, I can’t change one of them without silently breaking everybody’s code!

I’ve considered changing them to use a different type of parameter, e.g. an enum instead of a bool, but it’d need to be done in a way that causes a syntax error in all code that uses it, and forces people to explicitly fix it.

---

<div class="post-metadata">

**Author:** ![kunitoki](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kunitoki/32/15_2.png) [@kunitoki](https://forum.juce.com/u/kunitoki)\
**Post date:** [February 3, 2009, 11:52am UTC](https://forum.juce.com/t/combobox-setselectedid-update-parameter/3618/3 "2009-02-03T11:52:08Z")

</div>

yeah, i think you should consider a global (to all classes)

```auto
enum ListenerNotificationMethod
{
    SendChangeMessage = 1,
    DontSendChangeMessage = 2
};
```

or the like… used in the setXXX methods of relevance.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [February 3, 2009, 12:00pm UTC](https://forum.juce.com/t/combobox-setselectedid-update-parameter/3618/4 "2009-02-03T12:00:42Z")

</div>

The only worry is that some compilers might cast the enum to a bool and emit a warning rather than throwing an error. I’ll have to experiment.
