[squeak-dev] The Trunk: System-dtl.566.mcz

David T. Lewis lewis at mail.msen.com
Sat Jul 13 23:04:27 UTC 2013


On Sat, Jul 13, 2013 at 11:43:20PM +0100, Frank Shearar wrote:
> Why move methods to 'deprecated' though? Why not move them to 45Deprecated? (and maybe add the #deprecated: flag as well)

Because I don't want them removed until or unless we know it is safe to do
so, and because I wanted to move them into a category that would give an
indication that they should not be used except by (hypothetical) existing
code. I don't actually know if this is a real concern, but I know that
projects are saved in image segments, and that image segments are loaded
with an expectation that certain classes and methods will be present in
the image. Class Project is closely linked to this process, so I was just
trying to be safe.

I also added the following comment to each of the three methods:

  "Meaningful only for a Morphic project, but retained here to protect
  for possible references from e.g. image segments"

Hopefully these methods can just be deleted, but I don't know enough about
image segments and their use for Etoys projects to know if this is safe.
Aside from that concern, I would not bother to deprecate them at all, I'd
just get rid of them.

Dave


> 
> frank
> 
> On 13 Jul 2013, at 23:37, commits at source.squeak.org wrote:
> 
> > David T. Lewis uploaded a new version of System to project The Trunk:
> > http://source.squeak.org/trunk/System-dtl.566.mcz
> > 
> > ==================== Summary ====================
> > 
> > Name: System-dtl.566
> > Author: dtl
> > Time: 13 July 2013, 5:25:46.367 pm
> > UUID: a859fed7-6936-47ce-8d5a-60a4d21b5df6
> > Ancestors: System-dtl.565
> > 
> > Project class>>initialize is obsolete because it initializes CurrentProject with an instance of Project (not MorphicProject) and starts its (Morphic) UI process. Move the logic into MorphicProject class>>initialize where it will probably work as intended. Add similar initialization to MVCProject (untested). Remove broken Project class>>initialize.
> > 
> > Move some Morphic-specific utilities from class side of Project to MorphicProject, but keep methods in Project class in case of references from image segments (not sure if this is a real concern).
> > 
> > =============== Diff against System-dtl.565 ===============
> > 
> > Item was removed:
> > - ----- Method: Project class>>initialize (in category 'class initialization') -----
> > - initialize
> > -    "This is the Top Project."   
> > - 
> > -    CurrentProject ifNil:
> > -        [CurrentProject := super new initialProject.
> > -        Project spawnNewProcessAndTerminateOld: true].
> > - 
> > -    "Project initialize"!
> > 
> > Item was changed:
> > + ----- Method: Project class>>spawnNewProcess (in category 'deprecated') -----
> > - ----- Method: Project class>>spawnNewProcess (in category 'utilities') -----
> >  spawnNewProcess
> >      "Meaningful only for a Morphic project, but retained here to protect for possible
> >      references from e.g. image segments"
> > 
> >      self current spawnNewProcess!
> > 
> > Item was changed:
> > + ----- Method: Project class>>spawnNewProcessAndTerminateOld: (in category 'deprecated') -----
> > - ----- Method: Project class>>spawnNewProcessAndTerminateOld: (in category 'utilities') -----
> >  spawnNewProcessAndTerminateOld: terminate
> > +    "Meaningful only for a Morphic project, but retained here to protect for possible
> > +    references from e.g. image segments"
> > 
> > +    ^ self current spawnNewProcessAndTerminateOld: terminate
> > + !
> > -    self spawnNewProcess.
> > -    terminate
> > -        ifTrue: [Processor terminateActive]
> > -        ifFalse: [Processor activeProcess suspend]!
> > 
> > Item was changed:
> > + ----- Method: Project class>>spawnNewProcessIfThisIsUI: (in category 'deprecated') -----
> > - ----- Method: Project class>>spawnNewProcessIfThisIsUI: (in category 'squeaklet on server') -----
> >  spawnNewProcessIfThisIsUI: suspendedProcess
> >      "Meaningful only for a Morphic project, but retained here to protect for possible
> >      references from e.g. image segments"
> > 
> >      self current spawnNewProcessIfThisIsUI: suspendedProcess
> > 
> >  !
> > 
> > 


More information about the Squeak-dev mailing list