Op zondag 20 augustus 2006 02:20, schreef Philippe Valembois - Phil: > You get the principle but I would like to do something better than using > callbacks for events... Or at least use an event layer between GUI and proc > that do the things... I am using the event system in my example: amsn::handler "${w}_btnOK_click" ButtonOKClicked
The amsn::handler command is defined as part of the event system in the draft. As used here, is binds the proc ButtonOKClicked as a handler for the event. > I think XML2GUI should be a relatively simple thing to do isn't it ? > The hard work is to begin the spec for the XML and after that we could > create a Tk engine to have a base of work... > Phil > > Le Sunday 20 August 2006 00:11, Harry Vennik a écrit : > > Op zaterdag 19 augustus 2006 23:34, schreef Philippe Valembois - Phil: > > > > But anway, I think you are wrong in saying 'This way, if you want to > > > > create a new window, no need to upgrade GUI modules.' They will need > > > > to be updated to include a command to show the new window, as well as > > > > to handle events from the window when it is shown. > > > > > > No ! You don't see what I mean... The GUI module will export a function > > > CreateWindow(string XMLdata) > > > and when an event will occur it will do a Tcl_exec(fireevent, theevent) > > > So when we will want to create a new window we will simply create a new > > > XML data with all widgets we want described in it... > > > Phil > > > > Yes of course... What I actually meant with the 'command to show the new > > window' was the call to the CreateWindow. But anyway, I think I get it > > now. What you want to do is implement XML2GUI itself (and the event > > pass-through) in C, and all the rest in TCL and XML files. > > > > So from TCL you do something like: > > > > load_resource rsrc "my_window.xml" > > window create w $rsrc ;# Calls CreateWindow at C level > > amsn::handler "${w}_btnOK_click" ButtonOKClicked > > > > proc ButtonOKClicked { button } { > > # do some stuff > > } > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Amsn-devel mailing list > Amsn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amsn-devel ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel