A little late to the party, but another option that I have used is to create event listener interface. I extend the button class to include an event generator that maintains a list of listeners and I add an Add_Listener procedure so outside views can add themselves as listeners. I create a handler that Gnoga expects but have that handler operate the generator to fire the events out of the button class.
Then I extend whichever view I am using to implement the listening interface, override the create procedure, and have it call the Add_Listener procedure mentioned above. Then I just have to override the listener procedure that handles the event and I have both the parent view that is interested in the event and the button that sourced the original event. It's a bit complex, but it allows me to have any structure I want be able to respond to any event just by adding itself as a listener to the event. I could provide some example code, but I would want to pretty it up at least a bit. The one thing I do miss in Gnoga is event handling where you can provide the context to the handler rather than only the source of the event. On Tue, Jun 2, 2015 at 2:01 PM, Rabbi David Botton <[email protected]> wrote: > You will need to add an On_Focus handler to the forms, you can write a > single handler and just attach to all the widgets. Have it store the ID or > a pointer to the last focused widget. The browser doesn't store or report > the focus so no other way to get it. > > David Botton > > > On Mon, Apr 27, 2015 at 12:49 PM Wayne Bullaughey <[email protected]> > wrote: > >> I'm trying to build my 1st gnoga application somewhat based on the >> tutorial 9. I'm trying to create a two dimensional table with input fields >> on each row and a submit button per row. When a button is selected I want >> to get the values of each input on that row. >> >> I create two widgets, the first represents the whole table and the second >> one row. The 1st widget creates a view with a form in it and the table in >> the form. The second widget creates a row and three columns in the row. The >> 1st two columns are edit fields and the third a submit button. >> >> An On_Submit_Handler is set in the table widget. It gets called for the >> submit buttons. What I'm missing is how to access anything in the handler >> that lets me know what row the submit button was on and how to access the >> view data structure for the row. >> >> Thanks much >> Wayne >> >> ------------------------------------------------------------------------------ >> One dashboard for servers and applications across Physical-Virtual-Cloud >> Widest out-of-the-box monitoring support with 50+ applications >> Performance metrics, stats and reports that give you Actionable Insights >> Deep dive visibility with transaction tracing using APM Insight. >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y >> _______________________________________________ >> Gnoga-list mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/gnoga-list >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gnoga-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gnoga-list > >
------------------------------------------------------------------------------
_______________________________________________ Gnoga-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gnoga-list
