[Mono-bugs] [Bug 340461] Support for setting NULL value for ImageBrush::ImageSource

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 9 00:29:42 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=340461#c1


Miguel de Icaza <miguel at novell.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |toshok at novell.com




--- Comment #1 from Miguel de Icaza <miguel at novell.com>  2007-11-08 22:29:41 MST ---
I tried adding support for NULL values, but this causes problems elsehwere:

                        if (p->value_type >= Type::DEPENDENCY_OBJECT){
                                DependencyObject *val = NULL;

                                dob->SetValue (p, Value (val));
                                return true;
                        }
                        if (p->value_type == Type::STRING){
                                const char *val = NULL;

                                dob->SetValue (p, Value (val));
                                return true;
                        }

This code snippet could go in _set_dependency_property_value inside the case
that handle NPVARIANT_IS_NULL.   The problem with this approach is that our
code does not deal in some places with NULLs for certain objects.

I would add support for strings being NULL, but I want to discuss what to do in
general with the documentation from the spec stating that the default value for
this property is null, and our definition in brush.cpp being:

        ImageBrush::ImageSourceProperty = DependencyObject::Register
(Type::IMAGEBRUSH, "ImageSource", new Value (""));

An empty string.   


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list