Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Incorrect ASSERT in Value::Serialize
Incorrect ASSERT in Value::Serialize [message #21191] Fri, 08 May 2009 13:20 Go to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
In a (relatively) recent update the following line has been added to Value::Serialize:
ASSERT_(!type || Typemap().Find(type) >= 0, "Missing RichValueType<" + AsString(type) + ">::Register");

Clearly the purpose of this is to prevent serialization of non-registed types. However, it ignores the case of values created qith ErrorValue.

This means that if you Serialize a window with an (for instance) empty not-null EditField on you get an assert, but I can testify that this causes no ill effects. I actually use this feature to reset some forms to a null/clear state using Backup/Restore so now I have to comment out this line before I can debug my app.

Could this be fixed please.
Re: Incorrect ASSERT in Value::Serialize [message #21195 is a reply to message #21191] Fri, 08 May 2009 21:25 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I hope this should do the job:

Quote:


ASSERT_(!type || type == ERROR_V || type == UNKNOWN_V || Typemap().Find(type) >= 0, "Missing RichValueType<" + AsString(type) + ">::Register");




(I am now not on my local network and too lazy to switch svn to external address - will upload on sunday...)

Mirek
Previous Topic: Sunday/Saturday is wrong translated in some languages
Next Topic: Proposal: add Vector::InsertPick(int i, pick_ T&)
Goto Forum:
  


Current Time: Mon Apr 29 08:31:42 CEST 2024

Total time taken to generate the page: 0.02786 seconds