FileOut/FileIn problem
Joshua Channing Gargus
schwa at cc.gatech.edu
Wed May 16 13:01:37 UTC 2001
It's not my fault!!! It's student-of-Alan-Borning's fault! :-)
Your point is well taken. I usually don't use pools. However, I was
just doing as quick a port as I could, and so didn't change the use
of pools. I'll go make the changes right now.
Thanks,
Schwa
On Wed, May 16, 2001 at 08:53:58AM -0400, Jarvis, Robert P. (Contingent) wrote:
> Take a look at
>
> http://www.smalltalksystems.com/publications/pools.doc
>
> This is Juanita Ewing's paper on pools. At the very end she says
>
> Because pools are data, avoid pools whenever possible.
> Instead, create a class that encapsulates the data in
> the pool and replace existing pool variable references
> with messages. Your code reuse and ability to store
> your application in source form will improve.
>
> HTH
>
> Bob Jarvis
> Compuware @ Timken
>
> > -----Original Message-----
> > From: Joshua Channing Gargus [mailto:schwa at cc.gatech.edu]
> > Sent: Wednesday, May 16, 2001 8:46 AM
> > To: Squeak Mailing List
> > Subject: FileOut/FileIn problem
> >
> >
> > Hi,
> >
> > I'm running into a problem that I'm sure some long-time Smalltalker
> > will be able to easily help me with.
> >
> > I've done a port of Cassowary
> > (http://www.cs.washington.edu/research/constraints/cassowary/)
> > to Squeak, and all is well in the image that I ported it in. However,
> > when I try to file it out and file it in to a clean image, problems
> > arise. The problem has to do with pool variables; when I run the
> > demos, I get a walkback resulting from a nil value from a value in
> > the pool. However, if I inspect the variable in the debugger
> > (highlight it with the cursor, and Alt-i), it is what it should be.
> >
> > I think that this problem results from me transcribing the Cassowary
> > classes in alphabetical order instead of the order necessary to
> > ensure proper pool initialization.
> >
> > I can fix this problem by recompiling two classes as follows:
> > ClSimplexSolver compileAll. ClSymbolicWeight compileAll
> > I guess I could put this in the postscript, but I'd rather learn
> > what the problem is and fix it rather than work around it.
> >
> > I'm attaching my changesets. Experience this bug by:
> >
> > 1. File in Cassowary.1.cs
> > 2. File in Cassowary-Demo.1.cs
> > 3. Evaluate 'ClCrossedQuadDemo new openInWorld'
> >
> > nil gets sent the message negated. This is because Squeak thinks that
> > ClEpsilon (actually 'ClConstants at: #ClEpsilon') is nil. However,
> > inspecting the value of ClEpsilon shows that it is 1.0e-8, as
> > it should
> > be.
> >
> > I hope someone can help me, as I'd really like to make this cool
> > constraint framework available!
> >
> > Thanks,
> > Schwa
> >
More information about the Squeak-dev
mailing list
|