Questions about CREATOR

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Oct 26 23:14:08 CST 2003


on 10/26/03 14:57, chuck hinkle at chuckbo at hinkles.us wrote:

> To create the database, I'm using
> myDB = new goDB
> 
> f =  getsavefolderItem("gdb","TestDB")
> 
> mygoDB.schemaversion = 1
> mygodb.creator = "goDB"
> 
> 
> if f <> nil then
>   rc= mygDB.create(f,1,4*1024)
> end if
> 
> 
> That seems to work. I get a file out there. I can open it with the Vapp and
> examine the table structure. Looks good. But I'm able to select any file in
> the folder when I select the file to Open, and I get a NilObjectException
> error when I try to open the Valentina database that I just created.

Note:

    you must NOTIFY REALbasic what file types it must show in Open Dialog.
    Read RB docs, and I think in V4RB example this present.

    It seems in menu Edit you need create item -- File Type,
    and later use it when you start Open Dialog.


> dim f as folderItem
> dim rc as boolean
> 
> f = GetOpenFolderItem("gdb")
> if f<>nil then
>   rc = mygoDB.open(f)
> end if
> 
> I've gone to Edit File Type and added a type with a Name of gdb and a Mac
> Creator of GoDB and an extension of GDB.
> 
> I don't see where I've gone wrong, except that I really don't know what I'm
> doing with Creators and File types.

Creator type CANNOT (!!!) cause NIL exception !!!
Problem is in other place.

Before call mygoDB.open(f)
Have you create instance

     mygoDB = new MyDb ?

> Thanks for reading (and replying) to just a basic question. That's the
> problem with moving to a new database and new version of a language that
> I've really been using for lots of years ... I can do all kinds of really
> hard stuff, but some of the most fundamental items have me scratching my
> head.


-- 
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