[Mono-bugs] [Bug 391924] New: PropertyGrid: Use ShouldSerializeXXXX method to know whether property has non-default value
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon May 19 04:17:16 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=391924
Summary: PropertyGrid: Use ShouldSerializeXXXX method to know
whether property has non-default value
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: contact at i-nz.net
ReportedBy: andyhume32 at yahoo.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
PropertyGrid displays a property value in bold if that value has been set to a
value different than its default / should be written out if serialized. It
currently uses the DefaultValueAttribute, however it appears not to use the
ShouldSerializeXXXXX method.
* Repro using mwf-designer
Drag any control onto the form and note that its BackColor property is bold but
if you save the Form there's no value saved out to InitializeComponent. So, it
shouldn't be bold. (If one changes the value it is then serialized out, and
still displayed in bold). The ShouldSerializeBackColor method controls this
behaviour.
* Or, repro in PropGridObjMany7.cs attached, all in grid category
"ShouldSerializeXXXX/ResetXXX".
1) Property StringSsRNoNeinNyet has both ShouldSerialize and Reset methods,
together they apply the default of "No", and accept "Nein" and "Nyet" as
equivalent defaults.
Expected: If "No", "Nein" or "Nyet" then the value should /not/ be bold.
<Reset> calls the reset method which sets "No".
2) StringSsEvenLengthNoSz has a ShouldSerialize method, which controls that
strings with even length aren't serialized.
Expected: If even length string, then the value should /not/ be bold.
3) StringRaDefault has a Reset method, which applies "aDefault".
Expected: As there's no DefaultValueAttribute or ShouldSerialize method, the
value should always be bold. <Reset> calls the reset method which sets
"aDefault".
I think the fault is not in System.ComponentModel as the fault is still
apparent when running the app on the MSFT runtime but using Mono's SWF.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list