-------------------------------------------------------------------------- --# Demo of namespaces and Glade -------------------------------------------------------------------------- include GtkEngine.e include help.e include file.e include pref.e ifdef WINDOWS then add(builder,"main.glade") elsedef add(builder,"~/demos/glade/main.glade") end ifdef main() ----------------------------------------------------------------------- global function dispatch(atom ctl, atom data) -- handles all signals; ----------------------------------------------------------------------- atom fn = routine_id(get(ctl,"name")) if fn != -1 then return call_func(fn,{ctl,data}) else Error(,,"Invalid Function Call", sprintf("%s=>%s",{class_name(ctl),get(ctl,"name")}),GTK_BUTTONS_OK) end if return 1 end function -- function for main window; function random_color(atom ctl, atom data) set("window1","background",rand(#FFFFFF)) return 1 end function