Newbie

Youri lystes at free.fr
Sun Oct 22 12:33:25 CDT 2006


Ruslan Zasukhin wrote:
> On 22.10.2006 13:05, "Youri" <lystes at free.fr> wrote:
> 
>>> Which project fails? Your or our?
>>
>> My config is RB 2006 r4 under OS X 10.4.7 iMac G5.
>>
>> Your file downloaded "lesson 1 step 6" fails at the Open event of
>> Window1 see bellow :
>>
>>    // If Database exists we open it, otherwise we create it.
>>    try
>>      mDatabase.Open( f ) ---> FAILS!
>>    catch err as VException
>>      mDatabase.Create( f, EVDbMode.kDscDatBlbInd )
>>      CreateStructure()
>>    end
>>
> 
> Aha, I think I know what you mean.
> 
> Do you see that Debug window is thrown forward and some words about
> Exception ?
> 
> This is NORMAL
> 
> And you see Debuger window because you REALbasic have ON
> Option "Stop on Exception throw".
> 
> Disable this option in the menu Debug.
> 
> Run project again. Now you will not be stopped.

OK works now but when I try to navigte the recors I add in the DB (prev, 
first, next, last) I have a message saying : "An exception of class 
NilObjectException was not handled. The application must shut down.


Youri




> ---------
> And please read again carefully LOGIC of this function.
> I believe text of tutorial SAYS that open() can throw exception.
> This means that db file is absent.
> 
> Then we go into CATCH section and create db file on disk.
> 
> 
> -----------
> I think you are not used yet to conception of EXCEPTIONS.
> Am I right ?
> 
> This is OO feature. It present in C++, Java, REALbasic.
> 
> Read RB docs about this for details
> 
> 
> 


More information about the Valentina mailing list