Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » property grid serialization Collapse All
Subject Author Date
s p Jan 18, 2008 - 8:28 AM

Hi!
My question is the folowing :
I have a property grid and I want to do some serialization with it, but when I try to load the grid it always crashes (as soon as I move the cursor over a cell in the pg). I use a dynamic array of PropertyStores to represent the propertygrid. The code for the loading looks like this :

        ((TRenderSet*)(rs[j]))->Data->Open("e://test.dat",CFile::modeRead);
        CArchive ar(((TRenderSet*)(rs[j]))->Data,CArchive::load);

        PS[i].Serialize(ar);
        ar.Close();
        ((TRenderSet*)(rs[j]))->Data->Close();

The Data variable is of CFile type.
Any help is apreciated. sp

Technical Support Jan 18, 2008 - 10:33 AM

There is not enough information in your message to find out where and why the crash occurs. You can set your Visual Studio breaking at any C++ exception and you will see where it is exactly raised. Besides, both PropertyGrid and CompoundProperties sampleallow you to serialize the content of property stores and you can use any of these samples as an example.