<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 1, 2022 at 5:38 PM Wai Lun Mang <<a href="mailto:mang@acm.org">mang@acm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div dir="ltr">A way to do this is to find all the instances of Date using the allInstances method and iterated it.  Create the corresponding <span><span style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif">SmallDateAndTime and use become: to swap the pointers.</span></span></div></div></div></blockquote><div><br></div><div>I don't think you can use #become: with specials. They don't live in the object table.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div dir="ltr"><span><span style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif">  Once you have all the instances (store them in some global), you can use multi gem sessions to perform the migration assuming you have a lot of them.  </span></span></div><div dir="ltr"><span><span style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"><br></span></span></div><div dir="ltr"><span><span style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif">One thing to be careful is that gemstone system objects might have Date instances, it is safe to migrate them?</span></span></div></div></div></blockquote><div><br></div><div>It should be. Once the special representation was introduced, GemStone builds would have started using them. So, an older system upgraded to 3.6.x should be able to convert the Dates, etc. to specials and replace them.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div><br></div>
        
        </div><div id="m_5020352310299755815yahoo_quoted_2351739172">
            <div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Thursday, September 1, 2022 at 09:51:46 AM PDT, Richard Sargent via GemStone-Smalltalk <<a href="mailto:gemstone-smalltalk@lists.gemtalksystems.com" target="_blank">gemstone-smalltalk@lists.gemtalksystems.com</a>> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="m_5020352310299755815yiv9869355888"><div><div dir="ltr"><div>Sorry, Otto. #copy will NOT do it. I misread my results.</div><div><br clear="none"></div><div>I suggest you create an e.g. #normalized method on the various original classes and on their Small* subclasses and on Object. Object and the Small* classes would answer self. The implementation on DateAndTime, etc.would use the instance creation API to create a new instance (which would turn out to be the special OOP encoded object). Replace the instance if #normalized gives you a different object, leave it alone if it answers the original object.</div><div><br clear="none"></div><div><br clear="none"></div></div><br clear="none"><div id="m_5020352310299755815yiv9869355888yqt26464"><div><div dir="ltr">On Thu, Sep 1, 2022 at 9:32 AM Otto Behrens <<a shape="rect" href="mailto:otto@finworks.biz" rel="noreferrer noopener" target="_blank">otto@finworks.biz</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Ha! Thanks a lot Richard</div><br clear="none"><div><div dir="ltr">On Thu, 01 Sep 2022, 18:23 Richard Sargent, <<a shape="rect" href="mailto:richard.sargent@gemtalksystems.com" rel="noreferrer noopener" target="_blank">richard.sargent@gemtalksystems.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div dir="ltr">On Thu, Sep 1, 2022 at 5:18 AM Otto Behrens via GemStone-Smalltalk <<a shape="rect" href="mailto:gemstone-smalltalk@lists.gemtalksystems.com" rel="noreferrer noopener" target="_blank">gemstone-smalltalk@lists.gemtalksystems.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br clear="none"></div><div>We are upgrading to GS 3.6.x and would like to convert our Date objects to SmallDate and DateAndTime objects to SmallDateAndTime. What would be an efficient way to do this? I reckon I will have to hunt for the most commonly used places where they are used and then just convert.</div></div></blockquote><div><br clear="none"></div><div>Repository>>allReferencesToInstancesOfClasses: can be used to find the referencing objects. <br clear="none"></div><div> <br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br clear="none"></div><div>What would be the best methods to use to create a new SmallDate from a Date and a SmallDateAndTime from a DateAndTime?</div></div></blockquote><div><br clear="none"></div><div>
Sending #copy to the old DateAndTime should answer a SmallDateAndTime.  <br clear="none"></div><div><br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br clear="none"></div><div>Thanks<br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><table style="color:rgb(0,0,0);font-family:Times;font-size:medium" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" width="400" valign="bottom"><p style="margin:0px;padding:0px"><span style="font-size:18px;color:rgb(146,148,151);font-family:Calibri,sans-serif;font-weight:700">Otto Behrens</span><br clear="none"></p><p style="font-size:18px;font-weight:700;color:rgb(146,148,151);font-family:Calibri,sans-serif;margin:0px;padding:0px"><span style="font-size:14px;font-weight:300;margin:0px;padding:0px">+27 82 809 2375</span></p></td><td colspan="1" rowspan="1" width="200" valign="middle"><img src="https://www.finworks.biz/signature/finworks-signature-logo.png" alt="FINWorks" style="display: block; border: 0px none; width: 200px; min-height: 38px; margin: 0px; padding: 0px;" width="200" height="38"></td></tr></tbody></table><table style="color:rgb(0,0,0);font-family:Times;font-size:medium" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" height="5"></td></tr></tbody></table><table style="color:rgb(0,0,0);font-family:Times;font-size:medium;border-bottom:1px solid rgb(200,28,36)" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" height="15"></td></tr></tbody></table><table style="color:rgb(0,0,0);font-family:Times;font-size:medium" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" height="20"></td></tr></tbody></table><table style="color:rgb(0,0,0);font-family:Times;font-size:medium" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" style="display:inline-block" width="15" valign="top"><a shape="rect" href="http://za.linkedin.com/in/waltherbehrens" style="color:rgb(17,85,204)" rel="noreferrer noopener" target="_blank"><img src="https://www.finworks.biz/signature/finworks-linkedin-logo.png" alt="FINWorks" style="display: inline-block; border: 0px none; width: 15px; min-height: 15px; margin-top: 1.5px; padding: 0px;" width="15" height="15"></a></td><td colspan="1" rowspan="1" style="display:inline-block" width="250" valign="top"><a shape="rect" href="http://www.finworks.biz/" style="color:rgb(200,28,36);font-family:Calibri,sans-serif;margin-left:10px;margin-top:0px;padding-top:0px;font-size:11pt;display:inline-block" rel="noreferrer noopener" target="_blank">www.finworks.biz</a></td></tr></tbody></table><table style="color:rgb(0,0,0);font-family:Times;font-size:medium" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" height="10"></td></tr></tbody></table><table style="color:rgb(0,0,0);font-family:Times;font-size:medium" width="600" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1"><p style="font-size:10px;color:rgb(146,148,151);font-family:Calibri,sans-serif;text-align:justify">Disclaimer & Confidentiality Note: This email is intended solely for the use of the individual or entity named above as it may contain information that is confidential and privileged. If you are not the intended recipient, be advised that any dissemination, distribution or copying of this email is strictly prohibited. FINWorks cannot be held liable by any person other than the addressee in respect of any opinions, conclusions, advice or other information contained in this email.</p></td></tr></tbody></table></div></div></div></div></div></div></div>
_______________________________________________<br clear="none">
GemStone-Smalltalk mailing list<br clear="none">
<a shape="rect" href="mailto:GemStone-Smalltalk@lists.gemtalksystems.com" rel="noreferrer noopener" target="_blank">GemStone-Smalltalk@lists.gemtalksystems.com</a><br clear="none">
<a shape="rect" href="https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk" rel="noreferrer noopener" target="_blank">https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk</a><br clear="none">
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</div></div><div id="m_5020352310299755815yqt19052">_______________________________________________<br clear="none">GemStone-Smalltalk mailing list<br clear="none"><a shape="rect" href="mailto:GemStone-Smalltalk@lists.gemtalksystems.com" rel="noreferrer noopener" target="_blank">GemStone-Smalltalk@lists.gemtalksystems.com</a><br clear="none"><a shape="rect" href="https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk" rel="noreferrer noopener" target="_blank">https://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk</a><br clear="none"></div></div>
            </div>
        </div></div></blockquote></div></div>