V4RB NilObject question

Hugh Justham hugh at bullmedia.com.au
Sun Dec 21 04:49:33 CST 2003


On 20/12/03 7:57 AM, "valentina-request at lists.macserve.net"
<valentina-request at lists.macserve.net> wrote:

> Hi Hugh,
> 
> Please check 
> 
> if you have call ValentinaInit() in the Application.open() event?
> 
> 
>> Please help,
>> 
>> I am trying to access a database in an RB project


Ruslan, thanks for your response

Yes I do call ValentinaInit() in the opewn event of my application class

The problem for me seems to be that if I declare mDatabase as a property of
a class such as the application  or a window, then it doesn¹t get passed and
I end up with a NilObject.

I started off with a Menu handler in my application class.  Previously I was
erroring at the statement

    res = mDataBase.Create( f, 1, 32*1024 )

When I added the statement 'Mdatabase = New POSdb" before that statement it
worked.  Mdatabase was declared as a property of the application.

Surely it is possible to pass mDatabase to functions in other objects?  I am
not familiar with the scope of properties in RB I suppose.

Thanks again


Hugh



More information about the Valentina mailing list