[V4RB] Does order in constructor make difference?

Christer Olsson christer at ljusaideer.se
Fri Jan 23 19:21:43 CST 2004


I've spent the last five hours to hunt down a problem I've never seen before. We're adding two new tables ("Rabatter" and "Rabattrader") to our main app, and when we tried to add data to the new tables the app crashed every time on the second table.

It turned out that both tables were created just fine (i.e we could see and read them just fine with VAPP and ViSQL), but the baseObject for the second table ("Rabattrader"/"boRabattrader") had no fields...

After lot's of spellchecking, renamning and recreating of properties, methods and objects I just switched the order of the new tables in the database constructor - and suddenly everything worked just fine.

So, this didn't work:
  mInstallningar = new boInstallningar(self)
  mKunder = new boKunder(self)
  mArtiklar = new boArtiklar(self )
  mOrder = new boOrder(self)
  mOrderrader = new boOrderrader(self)
  mRabatter = new boRabatter(self)
  mRabattrader = new boRabattRader(self)

But this did:
  mInstallningar = new boInstallningar(self)
  mKunder = new boKunder(self)
  mArtiklar = new boArtiklar(self )
  mOrder = new boOrder(self)
  mOrderrader = new boOrderrader(self)
  mRabattrader = new boRabattRader(self)
  mRabatter = new boRabatter(self)

Any ideas?
-- 

  *************************************************************
  Christer Olsson   PO Box 9160        Phone +46 40 25 85 85
  Ljusa Idéer AB    SE-200 39 Malmoe   Fax +46 40 25 85 89
  Kantyxegatan 5    Sweden             http://www.ljusaideer.se


More information about the Valentina mailing list