on 8/5/01 0:43, Charles Yeomans at yeomans /at/ desuetude DOT com wrote:
> It's attached. Sorry I didn't strip it down; it's an example project for the > V4RB tutorial in progress, by the way. > > To see the problem, run the project; create a new db (see File menu). Open > the Find window and attempt to search for a record by date. This will cause > the Valentina error (I marked the offending line; it's in > FindWindow.SQLString; look for the comment //ERROR: "WHERE " should be " > WHERE "). > > I tried it running under OS 9 and OS X and had the same problem. > Hi Charles,
if you set debug level 2, you will see that BEFORE you call constructor of VException you do call
c = nil
i.e destructor of Cursor, and last CLEAR db.err of course.
I think you need to change a little API VException. Send to it not db ref, but Err, and optional error string.
> On Saturday, August 4, 2001, at 01:38 PM, Ruslan Zasukhin wrote: > >> on 8/4/01 18:51, Charles Yeomans at yeomans@desuetude.com wrote: >> >>> I'm having a problem with the code below. >>> >>> c = app.db.SQLSelect(SQLString) If c = nil or app.db.ErrNumber <> 0 then c = >>> nil Raise new ValentinaException(app.db, "FindWindow.FindButton.Action") End >>> if >>> >>> SQLString is a bad string which causes Valentina to throw error 602. When I >>> step through the code into the ValentinaException constructor, app.db shows >>> ErrNumber 0. >>> >> You mean that at first it show error 602 but after several steps become zero >> ? >> >> Or it become zero when you step into constructor ? >> >> Probably when you step into constructor it is executed call to V4RB (I think >> this is because RB try obtain new reference) >> >> Send me something to reproduce. >> >> as run around: obtain .Err into local variable, and send it to function. >>
-- Best regards, Ruslan Zasukhin
------------------------- Paradigma.
e-mail: ruslan /at/ paradigmasoft DOT com web : http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on@lists.macserve.net ©2001 Ruslan Zasukhin |