Won't Run Second Time

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Dec 30 01:34:21 CST 2005


On 12/30/05 12:55 AM, "Chuck Pelto" <cbpelto at pcisys.net> wrote:

Hi Chuck,

Well, our project crashes on my side on FIRST call to db.open()
So let's start watch your code.

In App.open() you have

    dbContacts = new cDatabase


And as far as I see you have made in project classes
    cDatabase, tblContacs, ...

So I assume you want to use Class Style. Right ?


-------------------
Okay, lets go to class cDatabase. O-ops.

There is no constructor here!

Instead you have   

CreateStructure()
  VDatabase(inStorageType)
  
  dfContacts = new tblContacts(self)
  dfForms = new tblForms(self)
  dfInformation = new tblInformation(self)
  dfSearchCriteria = new tblSearchCriteria(self)
  dfSearches = new tblSearches(self)
end


Chuck, but this is WRONG.
    * You have made function, but not constructor of class!
    * you have even call Vdatabase - parent constructor.
    
It must be as

Constructor()
  VDatabase(inStorageType)
  
  dfContacts = new tblContacts(self)
  dfForms = new tblForms(self)
  dfInformation = new tblInformation(self)
  dfSearchCriteria = new tblSearchCriteria(self)
  dfSearches = new tblSearches(self)
end


---------------------
Check, I will try cleanup your project now to make it work at least one
start. And send you back.

You need much more careful study examples.

CreateStructure() -- this was from API Style. And in API style it looks as

CreateStructure
  
   db.CreateTable( "Contacts" )
   db.CreateTable( "Contacts" )
   db.CreateTable( "Contacts" )
   db.CreateTable( "Contacts" )

End 

You see difference ?



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list