Init Check Bug? Re: Sizes and checks

Ed Kleban Ed at Kleban.com
Wed Dec 28 12:21:48 CST 2005


  
> 4) The V4RB Ref section on "Converting V4RB 1.x projects to 2.0" states:
> 
> € Valentina.Init() doesn¹t return a value anymore. Use the CacheSize
> properties to check if the database was properly initiated.
> 
> However there is no mention in the Initialization section that checking
> CacheSize is a good check to make.
> 

The following code in 2.1 fc1 results in an alert with the following
message:

    Database failed to initialize.  CacheSize = 6.711296e+7

So what should one test for?  Valentina.cacheSize > 0  ?

What is this strange value  6711296_ ?

64 * 1024 * 1024 = 67108864

The database continues to work fine of course.

============

  
  const ValentinaCacheMB = 64
  dim ValentinaCacheSize as Integer
  ValentinaCacheSize = ValentinaCacheMB * 1024 * 1024
  
  Valentina.Init( ValentinaCacheSize, MacKey, WinKey )
  
  if Valentina.cacheSize <> ValentinaCacheSize then
    alert( here, "Database failed to initialize.  CacheSize = " _
            + str(Valentina.cacheSize) )
  




More information about the Valentina mailing list