Re: Newera event processing
Posted in 1996
> We have had a lot of problems using Newera events e.g. > focusin/focusout of ixTextbox. It seems impossible to use events > without triggering other events and in some cases creating infinite > loops. Newera seems to work by posting events on to a queue which has > made impossible for us to do very simple tasks. > > Are you successfully using Events in your own classes/code ? When we used ixTexBox, we found the same problems so we now use manual superfields because it gives us access to the afterDataChanged event (plus others) which is very easy to use. There are other problems if you also use listboxes, radio buttons, etc. with superfields to do with currency (or multiple supertables for that matter). We solved this by overriding focusin/out to automatically call acceptCell(). We only use focusin/out to manage sequencing of events in all the visual classes. Even button.activate is only used to manage events because it also calls acceptCell() for the previous superfield. We have also introduced a number of other events in our superfield such as display, validate, trigger, etc. This has various advantages. The most important is that our field handler code is not one huge mass (we store the different handlers in different files). These events have very specific tasks in that we separate the presentation, navigation, and validation logic into different handlers, and overall, developing and maintaining a complex application within a team environment is a lot easier. Our base superfield class controls when these events should happen and so the dependencies/ interference between all our events is reduced. This allows us to reuse handlers easily. In fact we dynamically change our event/handler mapping all the time so suit the requirements. For example, if a field's afterdatachanged handler does different things based on which radio button is selected, we write each of these 'different things' in separate handlers and bind it whenever we need to. Handlers are grouped in files based on logical business processes rather than wifs. David W Chan GO5 Ltd dwc@cix.compulink.co.uk