13.07.2015 Views

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Caché</strong> 2010.1 <strong>Upgrade</strong> ChecklistThis will not work in the new class compiler due to system changes. Any applications using this questionable practice mustbe updated.System code public/private protection has now been changed; from a method of class X access to private members ofanother instance is possible only as long as the origin of the member is class X or a superclass of class X. This will allowmost common use of “Set %this=” to be changed to just access the private properties directly.<strong>InterSystems</strong> also found code where a classmethod was executingSet value=##this.Propertywhich was implicitly referencing %this on older <strong>Caché</strong> systems where the value of %this happened to be the last instancemethod that was called. This is a very risky practice since the last instance is not well-defined; if the classmethod is calledas the first thing, then %this will not be defined at all. Applications should be written to pass in the OREF of the object tothe classmethod explicitly.In the new compiler, references to “##this” are converted to $THIS, the current class context.5.2.6.7 State Of Serial Object Now Held In %%OIDIn prior versions, the serial state of an object was being kept internally. This has now been made visible in a real propertycalled %%OID. It is also updated for serial and stream objects. It is used in %Save to correctly handle the case where aserial object is independently serialized so it reports %IsModified()=0 to the save attempt, but the container does not knowthe new serial value. Using %%OID, the container can always get the correct version of the serial object.5.2.6.8 Setting A Serial Property To "" Causes It To Be InitializedWhen a class defines a serial property, constructing a new instance of this class and referencing this serial property willcause it to be created using the NewObject() method. If the application then sets this property to "", the property is nowreinitialized and the next reference will create it again using NewObject() just as if theoparent object had been newly created.5.2.6.9 NotInheritable Keyword RemovedIn previous versions, <strong>Caché</strong> allowed a user to define a 'not inheritable' property defined with an expression like:Property A As %String [ NotInheritable ];This concept breaks object inheritance because the superclass now has interfaces the subclass does not.Beginning with this version of <strong>Caché</strong>, this is no longer permitted. Compiling a subclass of a class with a noninheritableproperty will result in the an error because property “..A” was not present in the subclass.When upgrading to this version, the upgrade procedeures will automatically remove “NotInheritable” from any propertyand thus convert any noninheritable properties into inheritable ones. When it does this, it will add the comment [Previouslynotinheritable] to the property description.Any new properties marked as “NotInheritable” will cause an error when they are compiled. <strong>Caché</strong> Studio will be modifiedto remove the ability to set or display this keyword.5.2.6.10 Private Classmethods Now Supported<strong>Caché</strong> now supports private class methods. Private classmethods cannot be called from outside of the class (or a subclass).For backward compatibility, all class methods have been marked “public” so customer code will continue to work correctly.The descriptions of these methods have been altered to add the string, “[Previously private]”, to them.New private classmethods added to classes in the future will be inaccessible from outside the class.122 <strong>Caché</strong> <strong>Upgrade</strong> <strong>Checklists</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!