15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


VERSIONABLE_SCHEMA & GetObjectSchema Dilemmas...

Reza Razavipour -- biles.com!reza_r@jabberwock.biles.com
Tuesday, June 04, 1996

VC 4.1 on NT3.5.1 Patch 4.

I need to support multiple versions of a CDocument derived class called CPoint.
I keep getting -1 for ar.GetObjectSchema() when ar.IsLoading in the 
CPoint::Serialize();

I am using the IMPLEMENT_SERIAL with the third parameter as my version number.
In the .h file i have DECLARE_SERIAL macro. 

Can somebody tell me if I am missing some thing here?

I seem to recall having read a bug with schema versionning. If that is the case 
then how do I provide backward file loading capability?

TIA

Reza



funduc@sprynet.com
Saturday, June 08, 1996

[Mini-digest: 2 responses]

CPoint is taken.  Look it up in the MFC documentation.  You need to rename your 
class.

On Tue, 4 Jun 1996, biles.com!reza_r@jabberwock.biles.com (Reza Razavipour) 
wrote:
>VC 4.1 on NT3.5.1 Patch 4.
>
>I need to support multiple versions of a CDocument derived class called CPoint.
>I keep getting -1 for ar.GetObjectSchema() when ar.IsLoading in the 
>CPoint::Serialize();
>
>I am using the IMPLEMENT_SERIAL with the third parameter as my version number.
>In the .h file i have DECLARE_SERIAL macro. 
>
>Can somebody tell me if I am missing some thing here?
>
>I seem to recall having read a bug with schema versionning. If that is the case 
>then how do I provide backward file loading capability?
>
>TIA
>
>Reza
>
Mike Funduc
Funduc Software Inc.
funduc@sprynet.com
102372.2530@compuserve.com
http://home.sprynet.com/sprynet/funduc
http://ourworld.compuserve.com/homepages/funduc

-----From: "Peter A. Vanvliet" 

There is a difference between calling:

    m_myObject->Serialize(ar);

and

    ar >> m_myObject;

One gives you "-1" and the other works fine.




| Вернуться в корень Архива |