The Trunk: Morphic-dtl.668.mcz

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

The Trunk: Morphic-dtl.668.mcz

commits-2
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.668.mcz

==================== Summary ====================

Name: Morphic-dtl.668
Author: dtl
Time: 13 July 2013, 3:46:37.042 pm
UUID: b5f77258-d06d-4daa-b5d0-69899ab79585
Ancestors: Morphic-fbs.667

Provide class comments for MorphicProject and MVCProject.

UIProcess is maintained as a global in Project, but is meaningful only in Morphic. Make it an instance variable in MorphicProject.

Changes affect packages: System, Morphic, ST80.

Follow up required: remove the global after converting existing MorphicProject instances.

=============== Diff against Morphic-fbs.667 ===============

Item was changed:
  Project subclass: #MorphicProject
+ instanceVariableNames: 'uiProcess'
- instanceVariableNames: ''
  classVariableNames: 'DefaultFill'
  poolDictionaries: ''
  category: 'Morphic-Support'!
 
+ !MorphicProject commentStamp: 'dtl 7/13/2013 15:40' prior: 0!
+ An MorphicProject is a project with a Morphic user interface. Its world is a PasteUpMorph, and its UI manager is a MorphicUIManager. It uses a MorphicToolBuilder to create the views for various tools. It has a single uiProcess for its world, and Morph updates and user interaction occur in the context of that UI process.
+ !
- !MorphicProject commentStamp: 'ar 9/18/2009 21:38' prior: 0!
- Holds Morphic Projects. Very much in transition.!

Item was changed:
  ----- Method: MorphicProject class>>initialize (in category 'class initialization') -----
  initialize "MorphicProject initialize"
  "Initialize the default Morphic Project background"
  self defaultFill: (InfiniteForm with: self defaultBackgroundForm).
  self convertOldProjects.
  Project current isMorphic ifTrue:[
  "Set the default background in the current world"
  Project current world color: self defaultFill.
+ ].
+
+ "update the uiProcess instance variable in all Morphic projects"
+ self allSubInstances do: [:p | p uiProcess].!
- ].!

Item was changed:
  ----- Method: MorphicProject>>interruptName:preemptedProcess: (in category 'utilities') -----
  interruptName: labelString preemptedProcess: theInterruptedProcess
  "Create a Notifier on the active scheduling process with the given label."
 
  | preemptedProcess projectProcess |
  ActiveHand ifNotNil:[ActiveHand interrupted].
  ActiveWorld := World. "reinstall active globals"
  ActiveHand := World primaryHand.
  ActiveHand interrupted. "make sure this one's interrupted too"
  ActiveEvent := nil.
 
+ projectProcess := self uiProcess. "we still need the accessor for a while"
- projectProcess := UIProcess. "we still need the accessor for a while"
  preemptedProcess := theInterruptedProcess ifNil: [Processor preemptedProcess].
  "Only debug preempted process if its priority is >= projectProcess' priority"
  preemptedProcess priority < projectProcess priority
  ifTrue:[preemptedProcess := projectProcess].
  preemptedProcess suspend.
  Debugger openInterrupt: labelString onProcess: preemptedProcess
  !

Item was changed:
  ----- Method: MorphicProject>>spawnNewProcess (in category 'active process') -----
  spawnNewProcess
 
+ uiProcess := [
- UIProcess := [
  [World doOneCycle.  Processor yield ] repeat.
  ] newProcess priority: Processor userSchedulingPriority.
+ uiProcess resume!
- UIProcess resume!

Item was changed:
  ----- Method: MorphicProject>>spawnNewProcessIfThisIsUI: (in category 'active process') -----
  spawnNewProcessIfThisIsUI: suspendedProcess
  "Initialize a UI process if needed. Answer true if suspendedProcess was interrupted
  from a UI process."
+ self uiProcess == suspendedProcess ifTrue: [
- UIProcess == suspendedProcess ifTrue: [
  self spawnNewProcess.
  ^true
  ].
  ^false "no new process was created"
  !

Item was added:
+ ----- Method: MorphicProject>>uiProcess (in category 'active process') -----
+ uiProcess
+ ^uiProcess ifNil: [uiProcess := UIProcess]!

Item was added:
+ ----- Method: MorphicProject>>uiProcess: (in category 'active process') -----
+ uiProcess: newUIProcess
+ ^uiProcess := newUIProcess!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-dtl.668.mcz

Frank Shearar-3
On 13 July 2013 20:46,  <[hidden email]> wrote:

> David T. Lewis uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-dtl.668.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-dtl.668
> Author: dtl
> Time: 13 July 2013, 3:46:37.042 pm
> UUID: b5f77258-d06d-4daa-b5d0-69899ab79585
> Ancestors: Morphic-fbs.667
>
> Provide class comments for MorphicProject and MVCProject.
>
> UIProcess is maintained as a global in Project, but is meaningful only in Morphic. Make it an instance variable in MorphicProject.
>
> Changes affect packages: System, Morphic, ST80.
>
> Follow up required: remove the global after converting existing MorphicProject instances.
>
> =============== Diff against Morphic-fbs.667 ===============

I don't know if it's just me, but I have a walkback updating the
squeak-ci's Squeak4.5.image. "Error: Cannot store into read-only
bindings" because EncoverForV3PlusClosures >> #undeclared: is trying
to record #FileList2 in `cue environments undeclared`.

OK, that might be because I only _thought_ I undid the removal of
FileList2! Tools-fbs.485 was on my disk, but not in trunk.

So this might be "yes, we know that we can't declare something undeclared".

frank