- enter the lock password
- lock this page after save
タイトル:
最終更新情報: 9:17:01 pm on 4 November 2007 by swikis.ddo.jp
<style type="text/css">.st{color: brown;white-space: pre;}</style> !Improvements: - "Object>>sixxIgnorableInstVarNames" now works on class instance variables. - Added a new hook "Object>>sixxNonReferencableInstVarNames" for supporting non shared objects. - Added a hook "Object>>sixxReferenceIdInContext:" --By overriding this method, you can use your domain object's id in SIXX. - Added a new option "SixxSettings>>useReducedTags" --If this option is on, RIXX (Reduced SIXX) will be generated. - ShapeChanger can be used more easily (SixxShapeChangeReadStream is no longer needed, but it is left for backward-compatibility). !New SIXX Hooks: |Customizing serialization|| |Object>>sixxNonReferencableInstVarNames|Specify the instance variables that should not be referenced in SIXX. Values are always written redundantly. It is useful for small literal objects like String, Number, etc.| |Object>>sixxReferenceIdInContext:|Return unique id that can be referenced from other objects in SIXX. It is useful when objects have their own unique id.| !Formatter support: Formatter is a new SIXX function for customizing SIXX format without subclassing. Normally, you can customize SIXX serialization format by overriding hooks such as #sixxWriteValue, #sixxIgnorableInstVarNames. However, sometimes you would like to customize serialization format more dynamically. For example, you may want to change default Array serialization format to compact one, if the array includes only primitive (literal) elements. Suppose there is an array like: <code class="st"> array := #(1 2 3 4 5). </code> By default, the array will be sixxed out if you evaluate: <code class="st"> array sixxString. "print it" </code> <code class="st"> '<sixx.object sixx.id="0" sixx.type="Array" > <sixx.object sixx.id="1" sixx.type="SmallInteger" >1</sixx.object> <sixx.object sixx.id="2" sixx.type="SmallInteger" >2</sixx.object> <sixx.object sixx.id="3" sixx.type="SmallInteger" >3</sixx.object> <sixx.object sixx.id="4" sixx.type="SmallInteger" >4</sixx.object> <sixx.object sixx.id="5" sixx.type="SmallInteger" >5</sixx.object> </sixx.object>' </code> This format is reasonable for supporting complex array, but the format could be space-consuming if the array contains only primitive (literal) elements. By setting a Formatter, you can use more compact format for Array. <code class="st"> SixxContext formatters: {SixxMockLiteralArrayFormatter on: Array}. </code> After that, the format will be: <code class="st"> '<sixx.object sixx.id="0" sixx.type="Array" sixx.formatter="SixxMockLiteralArrayFormatter" > <sixx.object sixx.id="1" sixx.type="String" >&#35;&#40;1 2 3 4 5&#41;</sixx.object> </sixx.object>' </code> You can reset the formatter by: <code class="st"> SixxContext resetFormatters. </code> For convenience, there is a method to switch formatter temporarily. <code class="st"> SixxContext applyFormatters: {SixxMockLiteralArrayFormatter on: Array} while: [ array sixxString. ] </code> Or, you can even use: <code class="st"> SixxContext evaluate: [array sixxString] formattersBy: [:formatters | formatters add: (SixxMockLiteralArrayFormatter on: Array)]. </code> In short, Formatter can be used: - For customizing SIXX format dynamically. - For overriding SIXX format of the existing classes temporarily. !New ShapeChanger registration API From this version, ShapeChanger can be registered via SixxContext. The API is similar to using Formatter. <code class="st"> obj := SixxContext evaluate: [Object readSixxFrom: oldSixx] shapeChangersBy: [:shapeChangers | shapeChangers at: #SixxShapeChangedObject put: SixxSomeShapeChanger]. </code> _ You should also see *SIXX 0.2 Release Note*.
次回保存時にアラートメールを送信するメールアドレス一覧: