ENUMS simulations

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 18 23:50:20 CDT 2004


On 6/18/04 11:38 PM, "jda" <jda at his.com> wrote:

>> BTW, guys,
>> 
>> If you adopt old project then I recommend change to new constant names!
>> 
>> May happens that similar by name new constants have OTHER VALUES !!!
>> 
> 
> Hm, what do I use for kTypeBlob? As in this line of code created
> using Valentina Utilities
> 
>            if myDatabaseCursor.Field(j).Type <> kV_TypeBlob then
> 
> 
> I don't see anything that looks appropriate in the Valentina. autocomplete...

Right, I will add fields.

Btw, let's discuss the next idea.

Right now module Valentina have mixture of constants from different types
and enums.

It looks that I can improve this in the next way,
And get syntax 100% the same as Java have

* I can create in plugin MANY modules with e.g. name

    ELockType

And constants 

    kNoLock, kRadOnly, kReadWrite


* then we can write such syntax:

    db.SqlSelect( 
        query, 
        ECursorType.kServerSide
        ELockType.kReadOnly,
        Edirection.ForwardOnly )


Compare to current attempt

    db.SqlSelect( 
        query, 
        Valentina.kServerSide
        Valentina.kReadOnly,
        Valentina.ForwardOnly )

It looks to me that the first way is more clean.
And again, Java work with enums in this way.


-- 
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-beta mailing list