Re: NewEra 2.2 Superfield focusout() not working!!
Posted in 1997
I have developed several applications using Newera and the biggest problem encountered (there have been dozens) is the event processing in Newera. The fact that there are several types of current focus (i.e. superfield foucs and non superfield focus)means that I found it pretty much impossible to control user navigation with in a screen. Creating field level validation is very very difficult as you mentioned because moving out of a field only generates a focus out depending on where the user is going next! This is a minor problem as when you delve deeper and realise that you can actually get a "focus out" event on a control WITHOUT raising a "focus in"!!! I was told by Informix not to rely on the "focus in" event and only use "focus out". We found from an early stage that the event processing was flawed in that you could not use it effectively. Perhaps this is highlighted by the fact that I have been told by Informix that Newera 3.0 can use standard OCX modules BUT with a restriction .... it is not possible to utilise the events in an OCX! why not when visual Basic/Delphi can? As for the manuals we have often been told that a what I see as problem/bug "works as documented". Does this mean you document your bugs/design flaws to make them "features" or you were naive in not reading the manuals (approx 17 of them) before buying the product in the first place. It is a very difficult subject as the case you mention (focus out only occurs when moving to another superfield) is not a bug as it was designed that way and works as documented. BUT in practice, it is very difficult to develop applications with decent data validation and synchronise code with user input! I did not use supertables at first and had great difficulty using events to control navigation and perform data validation. I was then advised by an Informix consultant to use superfields. I did manage to utilise the automatic validation of superfields but then introduced a whole new set of problems. e.g. :- You cannot disable all superfields in a supertable as one object must have focus. You therefore have to create a small (out of visiblity to the user) and disable all superfield control but that one. But as the control is there only to allow the others to be disabled you have to call focus on another non superfield object (on the focus in) to move the cursor to another control. This was just one of many problems. I am not convinced that calling events your self always works as it introduces other problems based on the fact that Newera uses an "event stack" which you post events onto! I won't go into detail but suffice to say that if you have code on several events of various controls you end up in unpredictable situations and even infinite event loops. Good luck to anyone using event processing in Newera! Luismi wrote in article <5kdm0f$esh@cssun.mathcs.emory.edu>... >tim.simpson@excelsis.co.uk wrote: >> >> I have a free form supertable and a button. I have discovered that the >> >> focusout() event only happens when focus transfers to another >> >> superfield. If the user tabs to the button instead, the focusout() event >> doesn't happen until focus moves to another superfield!! >> >> How stupid! If focus moves from a control on the window why doesn't it >> happen. >> > > Some time ago, I found this type of behavior between SuperFields and >other controls (not SuperFields). I'm not sure now, but I think that the >FocusOut() worked well in 2.20, but for example data validation of the >cell doesn't occurs, as well as other associated events (afterCell or >BeforeCell events). > > Informix says me that that was the correct behavior, and refers me to >the ixSuperTable documentation to the Grafical & Connectivity Reference. >:-( > > You can save some of this stupid behavior controlling the next or >previous control and calling yourself the events (more work to you and >not for NewEra) > >-- >Luis M. Agudelo >luismi@nexo.es >