More crash info.

Ruslan Zasukhin sunshine at public.kherson.ua
Mon May 5 21:10:59 CDT 2003


on 5/5/03 7:36 PM, Zav - Alex Zavatone at zavpublic at mac.com wrote:

>> on 5/5/03 2:52 AM, Zav - Alex Zavatone at zavpublic at mac.com wrote:
>> 
>>>>    OpenDataBase(myDB, myDBPath,1) -- CREATE DATABASE FROM SCRATCH
>>> 
>>>  The above line instantly crashes Director if Valentina has
>>>  (mistakenly or on purpose) not been inited.
>>> 
>>>  Valentina should exit GRACEFULLY from such a condition.
>> 
>> Well, probably yes.
> 
> Can't you simply declare an  internal flag when the instance of the
> xtra is inited and check on an open database command?  If it fails,
> abort without crashing.  This might make V easier to learn and
> therefore get you new paying customers.

:-) 

In fact you are first who have get into this trap.
In the docs said by "big letters"

    CALL ValentinaInit BEFORE ANY CALL to Valentina.

Can you seat into a car, and do not insert a key?
Will you car move after this?
Even if you will press on Gas many times?  :-)

Yes, you car do not explore on this mistake...


-----
Zav, do you know why we have no such protection as you ask?

Okay, you say: make flag and check it on open.
But Zav, tomorrow somebody else will try call Cursor_Import() with call to
Valentina init. Can this be? Yes.

So it needs then, following by your logic add such check into EACH Valentina
call. Agree? 

But this will slow down code in case of CORRECT program.
We prefer speed. And reasonable error checks.


>> You need write scripts.
>> And later execute them.
>> 
>> Database do not like ANY mistake in steps.
>> So if you do this interactively you easy can do mistakes on some step.
>> 
>> Again, write scripts, and use DEBUGGER to see values of YOUR variables.
> 
> I do.  I don't understand what you are getting at.  I have to enter
> my commands in the message window to test my code.  I can't run the
> app from scratch all the time.

Hmm, but you should.

In worse case you should have prepared handlers that do some COMPLETE task
with Valentina. And call this handlers from message window.

Zav, please understand, database DO NOT forgive any mistake in ORDER OF
STEPS.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list