`ExternalAddress`: send `#initialize` *after* `#setAddress:`
...to make sure that pointer (handle) is valid when `#initialize`
is called.
This is to provide backward-compatibility for code that does things
in `#initialize` that requires the handle.
It is preferred to use new, more flexible method (introduced in commit
cad52f81f60c and in 74da99aeab66) and override `#fromExternalAddress:`
but not all code may have been migrated by now so provide this
compatibility.
--- a/ExternalAddress.st Fri Dec 03 12:26:39 2021 +0000
+++ b/ExternalAddress.st Mon Dec 13 13:46:39 2021 +0000
@@ -1,7 +1,7 @@
"
COPYRIGHT (c) 1995 by Claus Gittinger
COPYRIGHT (c) 2017 Jan Vrany
- COPYRIGHT (c) 2020 LabWare
+ COPYRIGHT (c) 2020-2021 LabWare
All Rights Reserved
This software is furnished under a license and may be used
@@ -28,7 +28,7 @@
"
COPYRIGHT (c) 1995 by Claus Gittinger
COPYRIGHT (c) 2017 Jan Vrany
- COPYRIGHT (c) 2020 LabWare
+ COPYRIGHT (c) 2020-2021 LabWare
All Rights Reserved
This software is furnished under a license and may be used
@@ -119,13 +119,13 @@
^ anExternalAddress
].
^ self basicNew
+ setAddress: anExternalAddress;
initialize;
- setAddress: anExternalAddress;
yourself
"Created: / 24-12-2014 / 22:18:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 25-12-2014 / 10:33:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 12-08-2020 / 12:04:48 / Jan Vrany <jan.vrany@labware.com>"
+ "Modified: / 13-12-2021 / 13:40:52 / Jan Vrany <jan.vrany@labware.com>"
!
newAddress:addr
@@ -155,6 +155,7 @@
! !
+
!ExternalAddress class methodsFor:'Compatibility-V''Age'!
fromAddress:anInteger