<br><br><div class="gmail_quote">On Fri, Jul 13, 2012 at 12:22 PM, Marcus Denker <span dir="ltr"><<a href="mailto:marcus.denker@inria.fr" target="_blank">marcus.denker@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On Jul 13, 2012, at 9:09 PM, Eliot Miranda wrote:<br>
<br>
> Hi All,<br>
><br>
> I'm profiling image startup and consequently want to pause a MessageTally during a snapshot. So I want to add MessageTally to the StartUpList immediately after Delay (the first entry in StartUpList) and to the ShutDownList immediately before Delay. But when I look at the SmalltalkImage accessor I see some confusion:<br>
><br>
<br>
</div>In Pharo I have rewritting this: you can add either before or after, so there is support for both adding before and after:<br></blockquote><div><br></div><div>Thanks, Marcus. Much simpler too.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
add: aClass toList: startUpOrShutDownList after: predecessor<br>
"Add the name of aClass to the startUp or shutDown list.<br>
Add it after the name of predecessor"<br>
<br>
</div> (Smalltalk globals includes: aClass)<br>
ifFalse: [self error: aClass name , ' cannot be found in Smalltalk dictionary.'].<br>
<div class="im"><br>
"Add after predecessor, moving it if already there."<br>
</div> (Smalltalk globals includes: predecessor)<br>
ifFalse: [self error: predecessor name , ' cannot be found in Smalltalk dictionary.'].<br>
(startUpOrShutDownList includes: predecessor name)<br>
ifFalse: [self error: predecessor name , ' cannot be found in the list.'].<br>
startUpOrShutDownList remove: aClass name ifAbsent:[].<br>
startUpOrShutDownList add: aClass name after: predecessor name<br>
<br>
<br>
add: aClass toList: startUpOrShutDownList before: successor<br>
<div class="im"> "Add the name of aClass to the startUp or shutDown list.<br>
</div> Add it before the name of successor"<br>
<br>
(Smalltalk globals includes: aClass)<br>
ifFalse: [self error: aClass name , ' cannot be found in Smalltalk dictionary.'].<br>
<br>
"Add before successor, moving it if already there."<br>
(Smalltalk globals includes: successor)<br>
ifFalse: [self error: successor name , ' cannot be found in Smalltalk dictionary.'].<br>
(startUpOrShutDownList includes: successor name)<br>
ifFalse: [self error: successor name , ' cannot be found in the list.'].<br>
startUpOrShutDownList remove: aClass name ifAbsent: [].<br>
startUpOrShutDownList add: aClass name before: successor name.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Marcus Denker -- <a href="http://marcusdenker.de" target="_blank">http://marcusdenker.de</a><br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>