C API addOptionsMenuItem callback not triggered


I'm using the addOptionsMenuItem or similar function in the C API and the callback doesn't trigger when executing or toggling the menu item.


void menuItemCallback(void *userdata)

const char *options[] = {"one", "two", "three"};
pd->system->addOptionsMenuItem("Item 3", options, 3, menuItemCallback, NULL);

Any ideas if I'm using it wrong or if there's a bug in the API?

Are there any example code of this working?