NewEra Demo code bugs
Posted in 1995
I've been attempting to learn NewEra and it's pretty hostile going.
'Developing Graphical Apps, chapter 6, Developing a Data Entry Window has
(at least) 3 errors. P 6-33 has
FUNCTION retrieveErrors(st ixSuperTable) RETURNING VOID
and in the code window (right underneath) has
FUNCTION retrieveError(ixSuperTable) RETURNING VOID
and BOTH are incorrect! The function name is retrieveError and the
function prototype is retrieveError(st ixSuperTable) RETURNING VOID. This
pair of errors is a real pain to spot. I thought I was doing something
really dumb.
Page 6-32 has code using the MESSAGEBOX function. This will not work
unless you put
INCLUDE "ix4gl.4gh"
in your window class pre_header area. (in fact, MESSAGEBOX and PROMPTBOX
won't work anywhere without this INCLUDE. Why isn't it a default INCLUDE?)
I believe that the code on p 6-40 causing the orders detail supertable to
be updated on change of a customer is also wrong; doesn't work for me
anyway. I took the code from Retrieve that dealt with orders (a function)
and called it from the NEXT PREV etc buttons. This works.
Now, a question. I can add a row to orders and hit the apply button. All
appears OK; the serial number is incremented properly, I can fetch another
customer's details, come back and my new data row is still present.
However, once I exit the window then re-run it, my inserted row(s) have
vanished.
Why? This is driving me nuts. So far, out of 7 manuals, the only one that
has much on HOW rather than WHY is chapter 6 of the above manual, and it
has errors. Yeah, I know about the cookbook code but I'd like some
work-through examples that work. Hell, I'm getting further in Delphi and I
don't know Pascal (do know C/C++) and have spent maybe 3 hours using Delphi
itself.
Manual version is 1.0; NewEra version is 1.1. I'm running locally against
the Win SE engine with a userid that owns the database and can insert
records into the orders table using dbaccess, so the permissions are OK.
TIA, Peter Wiley