'From Squeak2.8alpha of 13 January 2000 [latest update: #1899] on 2 March 2000 at 8:06:08 pm'! !HandMorph methodsFor: 'world menu commands' stamp: 'dew 3/2/2000 18:59'! startMessageTally | world | world _ self world. (self confirm: 'MessageTally will start now, and stop when the cursor goes to the top of the screen') ifTrue: ["MessageTally spyOn:" TimeProfileBrowser onBlock: [[Sensor primMousePt y > 0] whileTrue: [world doOneCycle]]]! ! !TimeProfileBrowser methodsFor: 'private' stamp: 'dew 3/2/2000 19:59'! runBlock | stream list | tally := MessageTally new. tally spyEvery: 16 on: block. stream := ReadWriteStream with: (String streamContents: [:s | tally report: s; close]). stream reset. list := OrderedCollection new. [stream atEnd] whileFalse: [list add: (stream upTo: Character cr)]. self initializeMessageList: list. self changed: #messageList. self changed: #messageListIndex. ! ! !TimeProfileBrowser methodsFor: 'private' stamp: 'dew 3/2/2000 20:04'! setClassAndSelectorIn: csBlock "Decode strings of the form ( [class]) " | string strm class sel parens | messageListIndex < 3 ifTrue: [^contents := nil]. "Ignore first 2 lines" string _ self selection asString. string isEmpty ifTrue: [^contents := nil]. string first == $* ifTrue: [^contents := nil]. "Ignore lines starting with *" parens := string includes: $(. "Does it have open-paren?" strm := ReadStream on: string. parens ifTrue: [strm skipTo: $(. "easy case" class := strm upTo: $). strm next: 2. sel := strm upToEnd] ifFalse: [strm position: (string findString: ' class>>'). strm position > 0 ifFalse: [strm position: (string findLast: [ :ch | ch == $ ])] ifTrue: [ | subString | "find the next to last space character" subString := strm contents copyFrom: 1 to: (string findLast: [ :ch | ch == $ ]) - 1. strm position: (subString findLast: [ :ch | ch == $ ])]. "ifFalse: [strm position: (string findLast: [ :ch | ch == $ ])." class := strm upTo: $>. strm next. sel := strm upToEnd]. class isEmpty ifTrue: [^contents := nil]. sel isEmpty ifTrue: [^contents := nil]. ^MessageSet parse: (class, ' ', sel) toClassAndSelector: csBlock! ]style[(30 553 95 51 125 34 12 54 3 282)f1b,f1,f1cred;,f1,f1cred;,f1,f1cred;,f1,f1cred;,f1! !