I'm not sure this will help, but I used this technique to get the output from a DropdownButton. I used this to switch basemaps from a drop down list on this site.
basemapGallery.on("load", function () {
for (i = 0; i < basemapGallery.basemaps.length; i++) {
(function (x) {
registry.byId('basemapMenu').addChild(new MenuItem({
label: basemapGallery.basemaps.title,
onClick: function () {
basemapGallery.select(basemapGallery.basemaps.id);
}
}));
}(i));
}
});