Community
Participate
Working Groups
It should be possible to define properties as "read-only" in order to avoid users from modifying them in the ServicesForm or ConnectorServicesForm.
I believe we should have this be an attribute of IProperty and not IPropertyType. Comments?
To be honest, I think that both make sense somehow. The original intent was for properties like an "Object Type" that can never be changed by a user, because an object is an object and cannot ever change its type. It's a read-only property that is shown for information only. But then you are right, there are also properties that are theoretically editable (like the name of an object, for instance) but cannot be edited at a given time - either because they are locked, or a file system is read-only, or a dialog just does not support editing. My feeling is that for the latter case, typically, it's an all-or-nothing issue: either all those properties which are editable in principle can also be edited (because the file system allows it etc) or none can be edited. Therefore I think that IProperty.setReadOnly() is of less value than IPropertyType.setReadOnly().
Types have typically been immutable. This has the pragmatic side effect of allowing singleton instances to be shared. Having a settable read-only attribute would break this unless we introduce new singletons for the read-only types.
Another thought - by "read-only" you don't want to disallow the setting of a property value in the IProperty protocol, you just want to have a means of disallowing editing in a dialog, correct?
Added the read-only attribute to IProperty which is needed in any case. Please re-open if this is really desired for IPropertyType as well.
[target cleanup] 2.0 M6 was the original target milestone for this bug