You can block the handlers then unblock as with:
w=gwindow()
b1=gradio(c("a","b"),container=w)
b2=gcombobox(c(1:2),container=w)
id = addHandlerClicked(b2,handler=function(h,...) print("clicked b2"))
addHandlerClicked(b1,handler=function(h,...) {
blockHandler(b2, id)
b2[,]=c(1:10)
unblockHandler(b2, id)
})
I flipped the order of assignment to get the handler id.
Alternatively, in gWidgets2 (still just on Github) it just works, as this assignment of selectable items for b2 isn't setting the selected value of b2. (Which you might want to do manually)
options("guiToolkit"="RGtk2")
library(gWidgets2)
w=gwindow()
g = ggroup(cont=w) ## only one child for a gwindow instance is enforced
b1=gradio(c("a","b"),container=g)
b2=gcombobox(c(1:2),container=g, expand=TRUE)
id = addHandlerChanged(b2,handler=function(h,...) print("clicked b2"))
addHandlerChanged(b1,handler=function(h,...) {
b2[]=c(1:10)
})