This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Base Class Properties are not ignored during application initialization

edited October 2014 in NG Controls
Hello,

NGSerializer fails with an error during startup when I try and serialize an Exception sub class even though I have [NoInherited] Attribute to the sub class. So I have the following class defined that I want to serialize:

[NoInherited]
MyException = Class(Exception)
private
. . . .
public
 Property ErrorMsg : String . . . 
 Property ErrorCode : Integer . . .,
 Property ExtendedErrorMessage : String . . .
end;

Then in my return code I create a serializer like this:

Serializer := TNativeXMLSerializer<MyException>.Create;

When I attempt to start my application I get the following error. <MyApp.exe> raised exception class ESerialize with message 'Cannot serialize values of type Pointer' When looking at the base Exception class there is a public property that is a pointer, but since I have specified NoInherited attribute these should be ignored. Is this a Bug?. 

I have also noticed this same error with a property in the serializable class marked with the Transient attribute. 

Why doesn't the serializer actually ignore Transient and inherited properties during startup when these attributes are used?

Thanks,

Todd Flora.

Comments

  • Hi,

    Look like a bug, I'll look at...
  • Awesome. . . I look forward to hearing from you on this. Also have you considered adding the pull request we made for Dates and Booleans?
Sign In or Register to comment.