Issue 3820 in pharo: TextConstants change to SharedPool breaks external code using at: message

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3820 in pharo: TextConstants change to SharedPool breaks external code using at: message

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.2.1 Milestone-1.3

New issue 3820 by [hidden email]: TextConstants change to SharedPool  
breaks external code using at: message
http://code.google.com/p/pharo/issues/detail?id=3820

If you fill an issue for the first time, please read "How to report bugs"
at http://www.pharo-project.org/community/issue-tracking

Pharo image: Core 1.2, Hudson build 228
Pharo core version: #12341
Virtual machine used: 4.0.3-2202 #1 XShm Tue Apr 13 11:56:47 PDT 2010 gcc  
4.3.2

The change of TextConstants from a Dictionary to a SharedPool in #3247  
breaks external code like Magma that uses the message at: to access the  
values stored in it and that SharedPool doesn't implement.

Henrik Sperre Johansen proposed the followin fix for backwards  
compatibility:

category: 'backwards compatability'

at: aSymbol
      ^self classPool at: aSymbol

at: aSymbol put: aValue
     ^self
         deprecated: 'TextConstants is not a place to store your stuff'
         on: '15 March 2011'
         in: 'Pharo1.2'

Attached the changeset with the code for integration in 1.2.1 and 1.3


Attachments:
        TextConstants.1.cs  1.2 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3820 in pharo: TextConstants change to SharedPool breaks external code using at: message

pharo
Updates:
        Status: FixProposed

Comment #1 on issue 3820 by [hidden email]: TextConstants change to  
SharedPool breaks external code using at: message
http://code.google.com/p/pharo/issues/detail?id=3820

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3820 in pharo: TextConstants change to SharedPool breaks external code using at: message

pharo

Comment #2 on issue 3820 by [hidden email]: TextConstants change to  
SharedPool breaks external code using at: message
http://code.google.com/p/pharo/issues/detail?id=3820

In 1.2.1 #12342

TODO: 1.3


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3820 in pharo: TextConstants change to SharedPool breaks external code using at: message

pharo

Comment #3 on issue 3820 by [hidden email]: TextConstants change to  
SharedPool breaks external code using at: message
http://code.google.com/p/pharo/issues/detail?id=3820

The at: method should be more precise, it should check both class vars and  
the dictionary TextSharedInformation :)

Here a fix for 1.3 (basically almost the same ^^)

Attachments:
        TextConstantsBackwardCompatibility.1.cs  1.4 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3820 in pharo: TextConstants change to SharedPool breaks external code using at: message

pharo
Updates:
        Status: Closed

Comment #4 on issue 3820 by [hidden email]: TextConstants change to  
SharedPool breaks external code using at: message
http://code.google.com/p/pharo/issues/detail?id=3820

in 1.3 13095