<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Well, when using Gemstone/S I always try to use the product methods first, then my own implementations and then external stuff.
</div>
<div class="default-style">
</div>
<div class="default-style">
So in this case I use under Gemstone/S "GsUuidV4 new asString36".
</div>
<div class="default-style">
</div>
<div class="default-style">
UUID is made available via category "Core-Squeak", printStringBase: is available in the category "squeak", "printStringRadix:" is a product method.
</div>
<div class="default-style">
</div>
<div class="default-style">
Marten
</div>
<blockquote type="cite">
<div>
Gabriel Cotelli via Glass <glass@lists.gemtalksystems.com> hat am 05.09.2023 19:53 CEST geschrieben:
</div>
<div>
</div>
<div>
</div>
<div dir="ltr">
<div>
<span style="color: #000000; background-color: #ffffff; font-family: arial,sans-serif;">The implementation in the base image</span><span style="color: #000000; background-color: #ffffff; font-family: arial,sans-serif;"> sends the message </span><span style="font-family: monospace;"><span style="color: #000000; background-color: #ffffff;">#'printStringBase:' </span></span><span style="color: #000000; background-color: #ffffff; font-family: arial,sans-serif;">that is not implemented.</span>
</div>
<div>
<span style="font-family: arial,sans-serif;">To reproduce evaluate something like:<br></span>
</div>
<div>
<span style="font-family: monospace;"> </span>
</div>
<div>
<span style="font-family: monospace;"><span style="color: #000000; background-color: #ffffff;">UUID new asString36</span></span>
</div>
<div>
</div>
<div>
</div>
<div>
The fix is straightforward using <span style="font-family: monospace;">printStringRadix:</span> instead
</div>
<div>
</div>
<div>
<div style="color: #cccccc; background-color: #1f1f1f; font-family: 'Droid Sans Mono','monospace',monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;">
<div>
<span style="color: #ce9178; background-color: #000000;">asString36</span>
</div> <span style="background-color: #000000;"><br></span>
<div>
<span style="color: #ce9178; background-color: #000000;"> | num candidate |</span>
</div>
<div>
<span style="color: #ce9178; background-color: #000000;"> num := 0.</span>
</div>
<div>
<span style="color: #ce9178; background-color: #000000;"> 1 to: self size do: [:i | num := num + ((256 raisedTo: i - 1) * (self at: i))].</span>
</div>
<div>
<span style="color: #ce9178; background-color: #000000;"> candidate := num printStringRadix: 36.</span>
</div>
<div>
<span style="color: #ce9178; background-color: #000000;"> ^((candidate beginsWith: '36r')</span>
</div>
<div>
<span style="color: #ce9178; background-color: #000000;"> ifTrue: [candidate copyFrom: 4 to: candidate size]</span>
</div>
<div>
<span style="color: #ce9178; background-color: #000000;"> ifFalse: [candidate]) asLowercase</span>
</div>
</div>
</div>
<div>
</div>
<div>
Regards,
</div>
<div>
Gabriel
</div>
</div> _______________________________________________ Glass mailing list Glass@lists.gemtalksystems.com https://lists.gemtalksystems.com/mailman/listinfo/glass
</blockquote>
</body>
</html>