[Commits] (morgen) Deprecating "defaultValue" in parcel.xml. Using it will generate an

commits at osafoundation.org commits at osafoundation.org
Mon Jul 19 16:45:42 PDT 2004


Commit by: morgen
Modified files:
chandler/application/Parcel.py 1.17 1.18
chandler/parcels/osaf/framework/blocks/parcel.xml 1.98 1.99

Log message:
Deprecating "defaultValue" in parcel.xml.  Using it will generate an
exception.  Use "initialValue" instead.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/application/Parcel.py.diff?r1=text&tr1=1.17&r2=text&tr2=1.18
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/parcel.xml.diff?r1=text&tr1=1.98&r2=text&tr2=1.99

Index: chandler/application/Parcel.py
diff -u chandler/application/Parcel.py:1.17 chandler/application/Parcel.py:1.18
--- chandler/application/Parcel.py:1.17	Mon Jul 19 13:12:23 2004
+++ chandler/application/Parcel.py	Mon Jul 19 16:45:41 2004
@@ -520,7 +520,7 @@
 
         for i in range(globalDepth):
             print " ",
-        print namespace
+        print str(namespace)
 
         # prepare the handler
         handler = ParcelItemHandler()
@@ -964,6 +964,12 @@
             # This is an attribute assignment; Delay it's assignment
             # until we reach the end of the xml document
 
+            # We are deprecating defaultValue:
+            if local == "defaultValue":
+                raise self.saveErrorState(
+                 "The 'defaultValue' attribute has been deprecated",
+                 self.locator.getSystemId(), self.locator.getLineNumber())
+
             # Initialize the assignment with values shared by all types:
             assignment = {
                "reloading"  : reloadingCurrentItem,
@@ -1308,7 +1314,6 @@
                                  (item.itsPath, attributeName, value)
 
                     except:
-                        print attributeName, value, key
                         raise self.saveErrorState("Couldn't add value to item ",
                          file, line)
 

Index: chandler/parcels/osaf/framework/blocks/parcel.xml
diff -u chandler/parcels/osaf/framework/blocks/parcel.xml:1.98 chandler/parcels/osaf/framework/blocks/parcel.xml:1.99
--- chandler/parcels/osaf/framework/blocks/parcel.xml:1.98	Mon Jul 19 12:21:37 2004
+++ chandler/parcels/osaf/framework/blocks/parcel.xml	Mon Jul 19 16:45:41 2004
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!-- $Revision: 1.98 $ -->
-<!-- $Date: 2004/07/19 19:21:37 $ -->
+<!-- $Revision: 1.99 $ -->
+<!-- $Date: 2004/07/19 23:45:41 $ -->
 <!-- Copyright (c) 2003 Open Source Applications Foundation -->
 <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
 
@@ -491,7 +491,7 @@
     
     <Attribute itsName="disabled">
       <type itemref="Boolean"/>
-      <defaultValue type="Boolean">False</defaultValue>
+      <initialValue type="Boolean">False</initialValue>
     </Attribute>
     
     <attributes itemref="docSchema:DynamicChild/dynamicParent"/>
@@ -1004,7 +1004,7 @@
       <description>Specifies which attribute of the selected Item should be associated with this block.</description>
       <type itemref="String"/>
       <cardinality>single</cardinality>
-      <defaultValue type="String"/>
+      <initialValue type="String"/>
     </Attribute>
 
     <attributes itemref="docSchema:ContentItemDetail/selectedItemsAttribute"/>



More information about the Commits mailing list