|
Post by noelhx on May 5, 2005 13:59:45 GMT -5
I am interested in the lack of support for native types. The first opportunity I had to use this library had to do with date classes. Since I was interfacing with existing code, I had to deal with the VB Date type. The cDateTime class and TimeSpan classes have no constructor or method that takes a VB date argument. You have to do too much extra work to take it apart into it's constituent parts to pass it to the library.
I like the concept behind the library, but I do not think it should be limited to emulating the NEW .NET framework only. Bridges to/from existing VB data types/structures would be invaluable in integrating into existing projects.
Yes, a simple wrapper constructor would be easy to write, but I feel this should be a part of the library, and not a stub function I have to write. It it is designed to be used within VB6, then it should be VB6 aware. A good way to get started is constructors that take native VB types.
Just my $.02, hope it is taken in the constructive way it is intended!
Noel Henderson
|
|
|
Post by Kelly Ethridge on May 5, 2005 15:41:53 GMT -5
Hello,
The date value is supported in creating a cDateTime object.
Set d = cDateTime.FromOADate(#1/1/2001#)
The TimeSpan can be created from time types such as hours.
Set t = TimeSpan.FromHours(22)
Any class that ends with 'Static' in the library contains methods accessible only through using the name of the class (minus the word static). There is a cDateTimeStatic class, so using cDateTime as a variable name followed by the period will reveal all static methods available.
All methods that take some kind of date value will accept both cDateTime objects and VB Date datetype value.
Thank you, Kelly #nosmileys#nosmileys
|
|
|
Post by Kelly Ethridge on May 6, 2005 2:09:39 GMT -5
Hello,
Ok, I've added a NewDate constructor for quick creation of a cDateTime object.
Dim d As cDateTime Set d = NewDate(#1/1/2001#)
Kelly
|
|
|
Post by Noelh on Jun 10, 2005 15:49:36 GMT -5
Sorry it took me so long to get back here. I appreciate the time you took to look at this. I am downloading the latest vesion from SF, and will continue to poke around at it.
Noel
|
|
|
Post by Kelly Ethridge on Jun 11, 2005 18:32:06 GMT -5
Yes, let me know what other types can be supported better, and how they might be supported.
Kelly
|
|