On Mar 15, 2011, at 5:58 AM, Miguel Cobá wrote:
I am trying to run Magma and uses TextConstants at: idiom.
Before 3247 TextConstants was a Dictionary and the at: message works ok. But now that it is a SharedPool there is no way to use the external code without modify it before it works in Pharo 1.2. This change doesn't even tries to present the same interface to acces the Text constants as before. The TextConstants>>at: message in Pharo 1.2 is the Object>>at: method that obviously doesn't work.
How could we do that? If the system badly uses a global variable in all sort of different ways then there is no way that we can propose the same interface. Then TextConstants had different and bad use: - storing constants - storing volatile information about fonts and all sorts of registrations for fonts!!! in textConstants "oh yes this is the dictionary so lets us mess there" instead of using adequate classVariables in adequate classes (we should still clean this part). TextSharedInformation below is for the moment containing all the crap.
What is the reason of this change? Why is better than the dictionary (I suppose that reifying it is a reason)?
because TextConstants was the **last** global pool and it was like a jellyfish. In fact when SharedPool were introduced by andreas (it was a good idea BTW) TextConstants was left because it was touching a lot of code. If we want to be able to get a bootstrappable core (and eliot and us want that) then we should clean the mess. Yes all the sharedPool are subclasses of sharedPool except TextConstants.... imagine the code to manage that. Is it a class, a traits, a global is it a dictionary of may be this is textConstants.....
What is the intended usage for code that uses TextConstants the dictionary access way? Specifically, code like this doesn't work anymore in Pharo1.2
self ~~ (TextConstants at: #DefaultTabsArray) and: [ self ~~ (TextConstants at: #DefaultMarginTabsArray) ]
Using accessors to control access to defaultTabsArrat and DefaultMargin.... is the first steps. Like that migration is easier. Now I do not really understand why a database has to change that kind of text information.
What should I do, I can't see a reopen status in the issue tracker. Should I open a new ticket?
Have a look in the SharedPool there is a classVariable SharedPool subclass: #TextConstants instanceVariableNames: '' classVariableNames: 'BS BS2 Basal Bold CR Centered Clear CrossedX CtrlA CtrlB CtrlC CtrlD CtrlDigits CtrlE CtrlF CtrlG CtrlH CtrlI CtrlJ CtrlK CtrlL CtrlM CtrlN CtrlO CtrlOpenBrackets CtrlP CtrlQ CtrlR CtrlS CtrlT CtrlU CtrlV CtrlW CtrlX CtrlY CtrlZ Ctrla Ctrlb Ctrlc Ctrld Ctrle Ctrlf Ctrlg Ctrlh Ctrli Ctrlj Ctrlk Ctrll Ctrlm Ctrln Ctrlo Ctrlp Ctrlq Ctrlr Ctrls Ctrlt Ctrlu Ctrlv Ctrlw Ctrlx Ctrly Ctrlz DefaultBaseline DefaultFontFamilySize DefaultLineGrid DefaultMarginTabsArray DefaultMask DefaultRule DefaultSpace DefaultTab DefaultTabsArray ESC EndOfRun Enter Italic Justified LeftFlush LeftMarginTab RightFlush RightMarginTab Space Tab TextSharedInformation' poolDictionaries: '' category: 'Collections-Text' Stef
Cheers -- Miguel Cobá http://twitter.com/MiguelCobaMtz http://miguel.leugim.com.mx