On Wed, 30 Apr 2008, Robert Parlett wrote: > Sorry, I should have explained that util__Event means class Event in the util > package - the name is "mangled" into util__Event by the compiler, but within
Oh, right, most other languages I've used have : instead of _ for that. > source code you can just refer to Event so long as you import util. > > Anyway, the pdf book on the unicon home page should be of help in explaining > the Event object - have a look at page 222 in the following :- I was looking at 417, which says: <quote> Event An instance of this class is generated by components and passed to the dialog_event method. It simply holds three elements, which can be accessed as follows: get_event() returns the Icon event associated with the event. </quote> So it should have a get_event method, then, shouldn't it? > > http://unicon.sourceforge.net/book/ub.pdf > Thank you Hugh > > On Wednesday 30 April 2008 15:14, Hugh Sasse wrote: > > On Wed, 30 Apr 2008, Robert Parlett wrote: > > > I think your problem is that the util__Event object doesn't have a method > > > called get_event(). It has member variables source, type and param, > > > with corresponding get methods. (The source is in uni/lib/event.icn) > > > > I can't see anything about util__Event in the Unicon book PDF. I > > was under the impression that handlers (for button clicks) got the > > event itself. Are there any good examples out there (of trapping > > the correct event on a button)? If it only gets a click event then > > presumably ev is only for seeing the number of associated data passed > > with the event? Otherwise ev would not be used. > > > > I haven't checked to see if google code knows about Unicon yet. > > > > Thank you, > > Hugh > > > > > Hope this helps. > > > > > > > 98 > > > > 99 # Browse for image1 > > > > 100 method on_image1_browse_btn(ev) > > > > 101 local result, eventname, container, code > > > > 102 eventname := ev.get_event() > > > > 103 container := ev.get_container() > > > > 104 code := ev.get_code() > > > > 105 # can I write stuff -- where will it go? > > > > 106 write("event " || eventname || " from " || > > > > 107 container || " with code " || code || > > > > 108 "\n") > > > > > > > > line numbers (added by vim : set number ) not actually in the source. > > > > > > > > > > > > Is there any way to get the variable name of the offending thing into > > > > the stack trace (by adding some debugging flags?) and is there an > > > > example available of how to use the events passed in to handler methods > > > > for buttons, anywhere? > > > > > > > > Thank you, > > > > Hugh > > > > > > > > ----------------------------------------------------------------------- > > > >-- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > > > Don't miss this year's exciting event. There's still time to save $100. > > > > Use priority code J8TL2D2. > > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/ > > > >java one _______________________________________________ > > > > Unicon-group mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/unicon-group > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > > Don't miss this year's exciting event. There's still time to save $100. > > > Use priority code J8TL2D2. > > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/ja > > >vaone _______________________________________________ > > > Unicon-group mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/unicon-group > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java > >one _______________________________________________ > > Unicon-group mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/unicon-group > ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Unicon-group mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unicon-group
