Success using I_ValueDateTime_Ptr; but how to use I_ValueDate_Ptr and I_ValueTime_Ptr?

Matthew Jew mjew at icnc.com
Fri Jun 30 11:52:31 CDT 2006


On Jun 30, 2006, at 1:29 AM, Ruslan Zasukhin wrote:

> On 6/30/06 10:53 AM, "Matthew Jew" <mjew at icnc.com> wrote:
>
>>
>> On Jun 30, 2006, at 12:05 AM, Ruslan Zasukhin wrote:
>>
>>> On 6/30/06 8:24 AM, "Matthew Jew" <mjew at icnc.com> wrote:
>>>
>>> Hi Matthew,
>>>
>>>> I have been able to set DateTime fields like this:
>>>>
>>>> I_ValueDateTime_Ptr pvdt = fbl_dynamic_cast<I_ValueDateTime>
>>>> ( aAuthFailureLogTable.loginDateTime->get_Value(forAdd) );
>>>> pvdt->put_DateTime( aDateTimeRec->year, aDateTimeRec->month,
>>>> aDateTimeRec->day, aDateTimeRec->hour, aDateTimeRec->minute,
>>>> aDateTimeRec->second, 0 );
>>>>
>>>> but when I try to do the equivalent thing for Date fields and Time
>>>> fields, it doesn't even compile:
>>>>
>>>> I_ValueDate_Ptr pvd = fbl_dynamic_cast<I_ValueDate> 
>>>> ( anArticleTable-
>>>>> date->get_Value(forAdd) );
>>>> pvd->put_Date( aDateTimeRec.year, aDateTimeRec.month,
>>>> aDateTimeRec.day );
>>>> I_ValueTime_Ptr pvt = fbl_dynamic_cast<I_ValueTime> 
>>>> ( anArticleTable-
>>>>> time->get_Value(forAdd) );
>>>> pvt->put_Time( aDateTimeRec.hour, aDateTimeRec.minute,
>>>> aDateTimeRec.second, 0 );
>>>>
>>>>
>>>> /Volumes/Alpha2/Dev-NuPV/PVReplicator2/../Common-Classes/
>>>> Valentina2pv/
>>>> ArticleDBManager2.mm:230: error: 'I_ValueDate_Ptr' was not declared
>>>> in this scope
>>>
>>> Strange...sounds like you you no included header FBL_I_ValueDate.h
>>>
>>> Here in this header you can see:
>>>
>>>     SMART_INTERFACE(I_ValueDate);
>>>
>>> Which defines this I_ValueDate_Ptr
>>>
>>>
>>> Although this header should be included via VSDK.h, which you use,
>>> right ?
>>> You should use ONLY and ONLY <VSDK.h>
>>>
>>>
>>>
>>
>> Yes, I use VSDK.h
>>
>> Sometimes, when it seems a definition or specific header is missing,
>> I will include it specifically.
>>
>> Should I include FBL_I_ValueDate.h?
>> And also FBL_I_ValueTime.h?
>>
>> And is the way I am trying to do it correct? (Except for the missing
>> definitions?)
>
> So,
>
> VSDK2.h has
>
> #include <VShared/FBL/publ/Interfaces/FBL_Interfaces.h>
>
> --------------
> And FBL_Interfaces.h has
>
> #include <VShared/FBL/publ/Interfaces/FBL_I_ValueDate.h>
> #include <VShared/FBL/publ/Interfaces/FBL_I_ValueDateTime.h>
> #include <VShared/FBL/publ/Interfaces/FBL_I_ValueTime.h>
>
>
> All looks correctly. Make sure you use VSDK2.h but not VSDK.h
>
>
>
>

I see that some of my problem is because I am converting a project  
from VSDK version 1
to VSDK version 2.

So some files use VSDK.h and some use VSDK2.h, which causes many re- 
definition complaints from
the compiler.

I would like to switch all to using VSDK2.h, but how do I access  
classes from VSDK version 1,
such as FBL_ArraySet definitions, if I just include VSDK2.h?

It seems that if I entirely remove the import of VSDK.h and just  
import VSDK2.h, then
the class FBL_ArraySet is undefined.

- Matthew




More information about the Valentina mailing list