Changes from 1.x to 2.0
Dave Parizek
dave at Parizek.com
Fri Feb 11 00:34:31 CST 2005
This info valid February 11, 2005.
Someone asked if there were any docs about the process of upgrading
from V4RB 1.x to 2.0.
I am working on the switch right now and so I have recorded the
changes I have had to make.
Note that I use the "sql way" pretty much exclusively, so others who
are making the switch and use the other ways -- API way, Zen way
(-: -- may want to contribute to this document. Please feel free
to add or correct anything.
My approach was to look over the new documentation first, then just
try to build/run my 1.x V4RB app that was working before installing
V4RB 2.0 and then start fixing errors that the compiler reports.
My way may not be the wisest -- use this info at your own risk.
Note the 2.0 docs are in V4RBReference_en.pdf and it is like 164
pages. If what you are looking at is around 84 pages, you are
looking at the old docs.
On the find/replaces, I recommend doing them using command-L rather
than clicking the Replace All button in RB, just to make sure you
have no unintended changes.
The steps I have performed:
1. ValentinaEscapeString find/replace to Valentina.EscapeString
2. ValentinaShutDown find/replace to Valentina.ShutDown
3. Reset the supers for all your BaseObjects to VTable
4. mDatabase.Open, mDatabase.Create no longer return anything, so
change code to reflect
5. look at Valentina.SetExtensions and decide if you want to use it
6. decide if you are doing a local database, or if you want to look
at remote/server database, read about this in docs
7. In Valentina initialization (VInit for me), change
ValentinaDebugOn to DebugLevel as EVDebugLevel syntax
8. ValentinaInit find/replace to Valentina.Init (and it no longer
returns a value)
9. the property "sqlstring" of class VCursor no longer exists. If you
reference that property you'll have to change code.
10. Property BaseObject of class VField changed to property Table, a
careful find/replace should fix. And find/replace all VBaseObject to
VTable.
11. VTable property GetRecID is renamed RecID, find/replace.
12. VCursor.CurrentPosition to VCursor.Position find replace.
13. VField.Nullable to VField.IsNullable find replace.
14. VField.Unique to VField.IsUnique find replace. And I see under
Class VField Property list in docs that it looks like there might be
some more like this depending on what properties you use in your
project.
15. hmm, VField.SetMethod no longer exists. I think you use
MethodText now. No, methodtext returns a value. I will comment it
out for now. Can someone else tell me what/how deal with this now?
16. ok, no more compile errors, but get VException pretty quick...
Says I am attempting to insert a duplicate key on a unique field. I
like this 2.0 feature -- more detailed error information.
17. Make sure you replace all kV_Nullable with EVFlag.fNullable in
all your constructors. My error in 16 was that I was defining fields
as Unique when I meant to define them as nullable, as they changed
the underlying integer values for those when they switched to enums
from "kv_" constants. In other words, kV_Nullable = EVFlag.fUnique =
4.
18. remove ValentinaUtilities (module with the kV_ constants) from
your RB project
19. Find/replace a bunch more kv_ constants with the EV... enumerator
equivalents. Most of the ones you need to find will be in the EVFlag
domain, but also some in other places like EVOnDeletion domain.
Compiler will tell you which ones you need to replace since you just
threw out ValentinaUtilities.
20. Fixed an unexpected token error where I had a string escaped with
double slash: \\ by changing to a single slash. V4RB 1.x did not
mind it but 2.0 does.
21. Another unexpected token error, haven't figured it out yet, going
to bed....
I will add to this tomorrow, or if anyone else wants to take it over...
--
_______________________________________________
Dave Parizek
Dave at Parizek.com
"Outside of a dog, a book is a man's best friend.
Inside a dog, it's too dark to read."
-- Groucho Marx
More information about the Valentina-beta
mailing list