<div dir="ltr">I used the existing edit: method in CustomHelp.<div>The help browser is hooked up in a little unusual way so editing is very indirect.</div><div>But I will look at accepting changes directly from the text pane, that is a much nicer solution.</div>
<div><br></div><div>Also since one can do HelpBrowser openOn: SystemReference, editing comments everywhere</div><div>will be a bigger task to handle.</div><div><br></div><div>Karl</div><div><br></div><div><div><br></div></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 29, 2014 at 6:31 PM, Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why a workspace instead of compiling straight to a method with a specified selector?<div><div class="h5">
<div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 28, 2014 at 6:47 AM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A new version of Morphic was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Morphic-kfr.724.mcz" target="_blank">http://source.squeak.org/inbox/Morphic-kfr.724.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-kfr.724<br>
Author: kfr<br>
Time: 28 June 2014, 1:46:47.335 pm<br>
UUID: ff507c56-3511-b446-abab-3e0c573e43c7<br>
Ancestors: Morphic-kfr.723<br>
<br>
Add convenience menu options for SketchMorph: encode graphics to a Workspace so graphics can be added in methods and a option to add graphics to Standard Graphics Library<br>
<br>
=============== Diff against Morphic-kfr.723 ===============<br>
<br>
Item was changed:<br>
----- Method: SketchMorph>>addCustomMenuItems:hand: (in category 'menu') -----<br>
addCustomMenuItems: aCustomMenu hand: aHandMorph<br>
"Add custom menu items"<br>
<br>
super addCustomMenuItems: aCustomMenu hand: aHandMorph.<br>
aCustomMenu add: 'restore base graphic' translated target: self action: #restoreBaseGraphicFromMenu.<br>
aCustomMenu add: 'call this my base graphic' translated target: self action: #callThisBaseGraphic.<br>
aCustomMenu add: 'choose new graphic...' translated target: self action: #chooseNewGraphic.<br>
aCustomMenu addLine.<br>
aCustomMenu add: 'set as background' translated target: rotatedForm action: #setAsBackground.<br>
+ aCustomMenu add: 'add to StandardGraphicsLibrary' translated action: #addToStandardGraphicsLibrary.<br>
+ aCustomMenu add: 'encode To Workspace' translated action: #encodeToWorkspace.<br>
self addPaintingItemsTo: aCustomMenu hand: aHandMorph!<br>
<br>
Item was added:<br>
+ ----- Method: SketchMorph>>addToStandardGraphicsLibrary (in category 'menu') -----<br>
+ addToStandardGraphicsLibrary<br>
+ | aName |<br>
+ aName := FillInTheBlankMorph<br>
+ request: 'Picture name ?'<br>
+ initialAnswer: self name.<br>
+ ScriptingSystem saveForm: rotatedForm atKey: aName<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: SketchMorph>>encodeToWorkspace (in category 'menu') -----<br>
+ encodeToWorkspace<br>
+ | stream encodedStream text |<br>
+ stream := RWBinaryOrTextStream on: String new.<br>
+ PNGReadWriter putForm: rotatedForm onStream: stream.<br>
+ encodedStream := stream contents asByteArray base64Encoded.<br>
+ text := Workspace open model.<br>
+ text contents: 'Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: ''' , encodedStream , ''' readStream)'!<br>
<br>
<br>
</blockquote></div><br></div></div></div></div>
<br><br>
<br></blockquote></div><br></div>