read|write only properties
- From: jacob berkman <jacob ximian com>
- To: gnome-components-list gnome org
- Subject: read|write only properties
- Date: 18 Jul 2001 12:36:41 -0400
bonobo-property-bag.c doesn't check for read (or write) only properties.
should we be setting the ReadOnlyProperty exception ourselves in
set_prop(), or is this a bug?
(and, shouldn't there be a WriteOnlyProperty exception, or even better,
something more like NotWriteable/NotReadable?)
anyway this patch makes bonobo-property-bag set the ReadOnlyException.
should it go into 1.0?
jacob
--
In the afterlife, a cute .signature will only get you so far.
Index: bonobo-property-bag.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-property-bag.c,v
retrieving revision 1.58
diff -u -r1.58 bonobo-property-bag.c
--- bonobo-property-bag.c 2001/06/05 09:11:21 1.58
+++ bonobo-property-bag.c 2001/07/18 16:33:16
@@ -744,6 +744,11 @@
return;
}
+ if (!(prop->flags & BONOBO_PROPERTY_WRITEABLE)) {
+ bonobo_exception_set (opt_ev, ex_Bonobo_Property_ReadOnlyProperty);
+ return;
+ }
+
if (!bonobo_arg_type_is_equal (prop->type, value->_type, opt_ev)) {
bonobo_exception_set (opt_ev, ex_Bonobo_Property_InvalidValue);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]