I have not yet tried that since my application has quite some widgets and signal_connects. It thus is quite some effort to restructure things. The builder thing might not be the actual issue since I use a Dict for storing config parameters. Thus my widgets are grouped in a type unstable composite type (together with the Dict) and I pass this to all callbacks. I have not yet a plan how I can structure this better. Thats why I am asking if you have a better pattern.
To give you an idea here is the pattern I use:
type DataViewerWidget <: Gtk.GtkBox
... # data Dicts, whatsoever
getindex(m::DataViewerWidget, w::AbstractString) = G_.object(m.builder, w)
uifile = joinpath(Pkg.dir("Packagename"),"src","UI","builder","dataviewer.xml")
b = Builder(filename=uifile)
mainBox = G_.object(b, "boxDataViewer")
m = DataViewerWidget( mainBox.handle, b, ...)
signal_connect(onMySliderChanged, , "changed")
signal_connect(m["mySlider"], "toggled") do widget
function onMySliderChanged(m:: DataViewerWidget)
... # do stuff
I have quite some flexibility, the code is IMHO quite readable, but on a large scale this is super slow to load.