SharedPool classVars

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

SharedPool classVars

Paul DeBruicker
Do SharedPool classVars need to be wrapped in parenthesis?

I'm messing around with porting Chronos to Pharo and Gemstone.  It
currently uses a number of shared pool dictionaries.  I'm converting
those to subclasses of SharedPool.  In the package there is a large
number of references to the classVars of the SharedPool.  Almost
everytime one is accessed I get a DNU or the value comes back as 'nil'.
  But if I wrap that particular reference in parenthesis the code works
fine.

So this doesn't work:

addHours: hours
  ^self addSeconds: hours * SecondsPerDay

But this does work:

addHours: hours
        ^self addSeconds: hours * (SecondsPerDay)


I do not want to track down every reference to every class var and wrap
it in parenthesis.  Is there something else I can try?  Or is there a
refactoring rewrite rule I can run to find all references to a
SharedPool class var and wrap it in parens?


Thanks

Paul

Reply | Threaded
Open this post in threaded view
|

Re: SharedPool classVars

Paul DeBruicker
Scratch that.  I did not initialise my classVars correctly.