To follow up a little on Tony's response...<br><br>Code reuse is only
as good as it is reuseable. This method is clearly not
reuseable. So, I would agree with Tony that you do some
refactoring. Before you do, make sure there is a test in
place so that you know you aren't breaking anything else.<br><br>You
may end up refactoring this message so that the current implementation
is the default, but then you add another message to make it more
generic. This is an excellent opportunity for you to dig
deeper into the world of Smalltalk.<br><br>Some hints for the road:<br>
<ol>
<li>Alt+n (senders of this message) will show you where this message is potentially being used</li>
<li>Alt+m (implementors of this message) may also be helpful</li>
<li>World Menu > Open > Method Finder (excellent for finding Methods that can do XYZ given the parameters A, B, & C)<br>
</li>
<li>Test! Test! Test!</li>
<li>"Branch" and work</li>
<ol>
<li>Create a new ChangeSet and a new version of your image</li>
<li>do your in this new version</li>
<li>when you are confident you have it all working file it out and then back in to your original image</li>
<li>if it works in the original image the way you expected and no tests
break, package it up and release it (perhaps as an .mcz as Tony
suggested)<br>
</li>
</ol>
</ol>
<br>
On 5/26/05, <a href="mailto:seaside@fbeausoleil.ftml.net">seaside@fbeausoleil.ftml.net</a> <<a href="mailto:seaside@fbeausoleil.ftml.net">seaside@fbeausoleil.ftml.net</a>> wrote:<br>> Hello, Tony,<br>> <br>> Thanks for the response.
<br>> <br>> Tony Garnock-Jones said the following on 2005-05-26 11:29:<br>> > Look at Form>>asMIMEDocument, which reads as follows in Seaside 2.5b3:<br>> ><br>> > asMIMEDocument<br>> > | aStream |
<br>> > aStream := (RWBinaryOrTextStream on: '').<br>> > GIFReadWriter putForm: (self asFormOfDepth: 8)<br>> > onStream: aStream.<br>> > ^MIMEDocument contentType: 'image/gif' content: aStream contents
<br>> <br>> I found that method. Am I supposed to just change it ? I'm coming from<br>> the Java world, and am uncomfortable doing just that.<br>> <br>> On the other hand, if you suggest I should copy the implementation to do
<br>> what I want, into my own component, I thought Smalltalk was the test-bed<br>> of code reuse ?<br>> <br>> Sorry for not understanding as quickly as you might think I should have.<br>> <br>> Bye !<br>
> François<br>> <br>> _______________________________________________<br>> Seaside mailing list<br>> <a href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</a><br>> <a href="http://lists.squeakfoundation.org/listinfo/seaside">
http://lists.squeakfoundation.org/listinfo/seaside</a><br>> <br><br><br>-- <br>Jason Rogers<br><br>"I am crucified with Christ: nevertheless I live; yet not I,<br>but Christ liveth in me: and the life which I now live in
<br>the flesh I live by the faith of the Son of God, who loved <br>me, and gave himself for me."<br> Galatians 2:20 <br>