Hi, I wanted to execute an action each time we resize some window and I wanted to see easily if the method layoutChanged is call each time we resize it. To test that I added «Transcript crShow: DateAndTime now asString» inside the method TransforMorph>>#layoutChanged. I wanted to resize a TransformMorph and check the transcript. But went I opened the Transcript⦠Surprise ! I had a lot of lines. I did the same in a new image of Pharo 5 and even with only 2 TransformMorph in the image there is A LOT of call to the method all the time. Is that normal ? Here an example: http://s11.postimg.org/n4rtz6xm9/Pharo_Screenshot.png -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France
2015-12-09 15:13 GMT+01:00 Ferlicot D. Cyril <cyril.ferlicot@gmail.com>:
Hi,
I wanted to execute an action each time we resize some window and I wanted to see easily if the method layoutChanged is call each time we resize it.
To test that I added «Transcript crShow: DateAndTime now asString» inside the method TransforMorph>>#layoutChanged. I wanted to resize a TransformMorph and check the transcript. But went I opened the Transcript⦠Surprise ! I had a lot of lines.
I did the same in a new image of Pharo 5 and even with only 2 TransformMorph in the image there is A LOT of call to the method all the time.
Is that normal ?
I thnk the Transcript scroller uses a TransformMorph as well.
Here an example: http://s11.postimg.org/n4rtz6xm9/Pharo_Screenshot.png
-- Cyril Ferlicot
165 Avenue Bretagne Lille 59000 France
Le 09/12/2015 15:18, Nicolai Hess a écrit :
I thnk the Transcript scroller uses a TransformMorph as well.
I tried 4-5 other methods without a transcript to see if the same thing happen without it but each time the image crash immediately⦠I tried to print in stdout, in rubric, to use #inform:, to write in a file⦠Nothing works, I get an emergency evaluator all the time. -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France
2015-12-09 15:47 GMT+01:00 Ferlicot D. Cyril <cyril.ferlicot@gmail.com>:
Le 09/12/2015 15:18, Nicolai Hess a écrit :
I thnk the Transcript scroller uses a TransformMorph as well.
I tried 4-5 other methods without a transcript to see if the same thing happen without it but each time the image crash immediately⦠I tried to print in stdout, in rubric, to use #inform:, to write in a file⦠Nothing works, I get an emergency evaluator all the time.
you can: - create a "global" morph for logging: (Smalltalk at:#testLabel put:StringMorph new) openInWorld. - and in TransformMorph>>layoutChanged put (Smalltalk at:#testLabel) contents:(DateAndTime now asString). Now, every time the layoutChanged method is called, the string morph will show the current time stamp. (You can extent this ,by for example, use a nother "global var" for counting the calls)
-- Cyril Ferlicot
165 Avenue Bretagne Lille 59000 France
Le 09/12/2015 15:47, Ferlicot D. Cyril a écrit :
Le 09/12/2015 15:18, Nicolai Hess a écrit :
I thnk the Transcript scroller uses a TransformMorph as well.
I tried 4-5 other methods without a transcript to see if the same thing happen without it but each time the image crash immediately⦠I tried to print in stdout, in rubric, to use #inform:, to write in a file⦠Nothing works, I get an emergency evaluator all the time.
If you use the Jejak tracer, then you would get events for each call of the method, and then you could filter on which instance you want to see the events. Jejak is a bit rough to use at the moment however... Thierry
participants (3)
-
Ferlicot D. Cyril -
Nicolai Hess -
Thierry Goubier