[ATTN!] Inform us about your show-stoppers bugs in 2.4 betas if any!

Dave Addey listmail1 at dsl.pipex.com
Sat Jul 8 09:33:47 CDT 2006


Hi Ruslan,

I understand now - thanks!  I changed my test project to use API-way, and
everything works fine.

I had been looking for an article like that one - it makes everything much
clearer.  It would be useful if you could add in some advantages and
disadvantages for the Class-way, to make it very very clear that the
structure is "fixed" when you use the class-way.

I shall change my code to use the API-way!

Dave.

> From: Ruslan Zasukhin <sunshine at public.kherson.ua>
> Reply-To: Valentina Developers <valentina at lists.macserve.net>
> Date: Sat, 08 Jul 2006 02:14:40 +0300
> To: "valentina at lists.macserve.net" <valentina at lists.macserve.net>
> Conversation: [ATTN!] Inform us about your show-stoppers bugs in 2.4 betas if
> any!
> Subject: Re: [ATTN!] Inform us about your show-stoppers bugs in 2.4 betas if
> any!
> 
> On 7/7/06 11:23 PM, "Dave Addey" <listmail1 at dsl.pipex.com> wrote:
> 
> Hi Dave,
> 
>> So how *do* I do this in the class-way?  I did not realise that it was so
>> fixed from the docs - and I have not been able to find any way to do this
>> safely for the class-way, in any of the docs.  How should I do this?
> 
> 1) IF you have setup structure of db + tables as classes,
>     then you cannot change this
> 
> 
> 2) only way is described for case, if you need in new version of product
> upgrade structure. Then steps are:
> 
> Dim db as Vdatabase = new VDatabase
> 
> If( db.schemaVersion is old )
> 
>     db.open   << not as myDatabase !!
> 
>         do API calls like DropTable, CreateTable
> 
>     db.SchemaVersion = db.SchemaVersion  + 1
> 
>     db.close     
> 
> End if
> 
> // now we have current structure of db
> 
> Mydb as MyDatabase = new MyDatabase
> Mydb.Open
> 
> 
> 
> 3) in your case you want drop current table, then create it back.
>     then DO NOT use it as class!
> 
> You can have OTHER tables as classes:
> 
>     MyDatabase
> 
>         // STATIC tables.
>         // Objects of static tables are created BEFORE Create()
>         t1 = new MyTable1
>         t2 = new MyTable2
>         t3 = new MyTable3
>     end
> 
> But MyTable4 must be DYNAMIC, and you  need create it AFTER db.Create() or
> db.Open. And note, there is no FIXED pointer to tables.
> 
> ----------------------------
> App.Open
>     dim db as MyDatabase = new MyDatabase
>         // this have create 3 *objects* of VTable in memory
> 
>     db.Create() 
>         // this have create them on disk
> 
> 
>    // now you can in any place and in any time create 4th table
>    tbl = db.CreateTable( "Table4" )
> 
>     db.DropTable( tbl )
> end    
> 
> 
> -- 
> when you need get pointer to this table you do simply
>     db.Table( "Table4" )
>     
> 
> ------
> http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
> tation:articles:articles
> 
> Here read article  -- Choosing a Style of Coding
> 
> 
> 
> -- 
> 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]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina




More information about the Valentina mailing list