Comment 1 for bug 2046077

Revision history for this message
hilaire (hilaire-fernandes) wrote :

Hack #1 to get the debugger. The context is lost though. The method wait for the process to terminate, which is subnominal.

executeSketch
 | errorFlag |
 self stopSketch.
 codeView scroller acceptContents.
 self switchToPauseButton.
 errorFlag := false.
 DrGeoSketch when: #newSmalltalkSketch send: #compiledSketch: to: self.
 sketchProcess := [ | t |
  t := DateAndTime now.
  [Compiler evaluate: model] on: Error do: [:exception | errorFlag := true. self debugWindowSketch ].
  " When we get there, sketch has been entirely executed, switch back to play button "
  self switchToPlayButton.
  Transcript show: DateAndTime now - t ;cr] newProcess.
 sketchProcess
  priority: Processor userSchedulingPriority ;
  name: '[DrGeo] Smalltalk Sketch execution';
  resume.
 [sketchProcess isTerminated] whileFalse.
 errorFlag ifTrue: [ self debugSketch ]