Re: NewEra 2.2 Superfield focusout() not working!!
Posted in 1997
Ian Tuck wrote: > > Tim Simpson wrote in article ... > >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!! > >-- [many realworld and helpful remarks on focus in NewEra deleted] > >Tim Simpson > > Hi there :> It is true that focus in NewEra sometimes produces non-intuitive results. What I dont understand in your discussion is what these things have to do with _Validation_. In fact I defined a framework for a giant over 100 screen application (about 75% done) here. Focusin and FocusOut Events are never used throughout the whole code. Why do you want to do validation with an event that returns void and doesnt influence traversal between fields and rows? beforeDataChanged and afterDataChanged are the right places to do. beforedatachanged if you want the user to stay in a field until he/she inputs something valid. afterDataChanged if you allow traversal to another field even if non-valid data was input (you then have to update a flag you access in dataRowCheck to prevent the saving). These concepts are stable, reliable and fit into the concept of cell-level and row-level validation. The only situation where you could use focusOut meaningful is the situation where the user inputs something and you want to comment this for example by displaying a messageBox giving more information about the thing the user input. But then afterCell is the much better choice. I allways see novice users playing around with focus events first. Probably because it seems to be an easy concept. Usually it takes them some time until they find out that this is not the right place to do things. I never visited a NewEra course myself but I get the impression that they dont deal with the real-world problem of data-validation enough there. I also never saw a form of "how-to" on data validation. And you are right: these thousends of manual pages are just wasted... they are not helpful if you want to solve a problem. Have fun Dirk -- -- Dipl.-Math. Dirk Gunsthoevel phone: +49 (0)251 624947 -- Hoeftestr.49 fax: +49 (0)251 624177 -- 48167 Muenster 2*3*3*37 - the prime factorization of the beast -- Germany http://members.aol.com/Plabit/welcome.html