<div dir="ltr">Tim,<div>Many thanks.</div><div><br></div><div>-- Rick</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 26, 2014 at 12:39 AM,  <span dir="ltr"><<a href="mailto:timfelgentreff@gmail.com" target="_blank">timfelgentreff@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">
<div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt"><div>Only just realized that Robert put a module in for 3 some time ago: <a href="https://github.com/LivelyKernel/LivelyKernel/commit/31870348b9c1b5450294b4658fef142c44fd1988" target="_blank">https://github.com/LivelyKernel/LivelyKernel/commit/31870348b9c1b5450294b4658fef142c44fd1988</a></div>
<div><br></div><div style="margin-right:0px" dir="ltr">It seems you should be able to just use lively.morphic.Preview.renderMorphToNewImage(morph, {}, callback)</div><div><br></div><div><br></div><div style="padding-top:5px;border-top-color:rgb(229,229,229);border-top-width:1px;border-top-style:solid">
<div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style="line-height:15pt;letter-spacing:0.02em;font-family:"Calibri","Segoe UI","Meiryo","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","sans-serif";font-size:12pt"><b>From:</b> <a href="mailto:timfelgentreff@gmail.com" target="_blank">Tim Felgentreff</a><br>
<b>Sent:</b> ‎Monday‎, ‎May‎ ‎26‎, ‎2014 ‎9‎:‎27‎ ‎AM<br><b>To:</b> <a href="mailto:rick.mcgeer@gmail.com" target="_blank">Rick McGeer</a>, <a href="mailto:lively-kernel@hpi.uni-potsdam.de" target="_blank">lively-kernel@hpi.uni-potsdam.de</a></font></div>
</div><div><div class="h5"><div><br></div><div dir="ltr">


<div>Hi</div><div><br></div><div>Re 1: I think the functions on the world may just not be serialized usually, but it works for me if you do</div><div>   $world.addScript(function onFocus(evt) {<br>        alertOK("World focus")<br>
        if (!this.isFocusable()) { this.blur(); return };<br>        lively.morphic.Morph.prototype._focusedMorph = this;<br>    })<br></div><div><br></div><div>Re 2: The Shortcuts documentation says you can add links with CMD+K</div>
<div><br></div><div>Re 3: I did that once for PartsBin screenshots. This issue describes how it can be done: <a href="https://github.com/LivelyKernel/LivelyKernel/issues/248" target="_blank">https://github.com/LivelyKernel/LivelyKernel/issues/248</a></div>
<div><br></div><div>Hope that helps,</div><div>Tim<br></div><div><br></div><div style="padding-top:5px;border-top-color:rgb(229,229,229);border-top-width:1px;border-top-style:solid"><div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style="line-height:15pt;letter-spacing:0.02em;font-family:"Calibri","Segoe UI","Meiryo","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","sans-serif";font-size:12pt"><b>From:</b> <a href="mailto:rick.mcgeer@gmail.com" target="_blank">Rick McGeer</a><br>
<b>Sent:</b> ‎Monday‎, ‎May‎ ‎26‎, ‎2014 ‎3‎:‎29‎ ‎AM<br><b>To:</b> <a href="mailto:lively-kernel@hpi.uni-potsdam.de" target="_blank">lively-kernel@hpi.uni-potsdam.de</a></font></div></div><div><br></div><div dir=""><div dir="ltr">
<ol style="padding-top:0px;padding-bottom:0px;margin-top:0px;margin-bottom:0px;list-style-type:decimal"><li>I'm having this odd behavior where $world.onFocus() is getting overwritten on a $world.saveWorld().  Specifically, I set $world.onFocus to a function which assigns the focus to a specific morph on the page ($world.get('2048Board').get('Board').focus()).  This works fine, and when I click away from the tab and back to it the focus is assigned correctly.  I can also look at $world.onFocus and see it's the correct function.  However, after I do a $world.saveWorld() and then reload the page, I get the default $world.onFocus method, not the one I wrote.  Is this a bug, or is there something I'm doing wrong?</li>

<li>Is there a preferred way of doing hyperlinks?   I can think of at least two, and I'm sure that there are more.  The two I've thought of are to use an HTMLWrapperMorph, and to attach an onMouseDown event, but I guarantee there's a third way, and the third way is better.  I know there's a third way because I've looked at the source for the welcome page, and the hyperlinks are in text morphs, which turn into <span>s in the HTML source, and the links themselves are <uri> tags in the span.  My problem is I don't know how to create this using Morphic (it may be I am just slow today).  The hell of it is, I knew how to do it once, because I put the link to Lively Cheat Sheet on the Welcome page (I wanted to put the link to Robert's marvelous Lively 101 page there, too, but more important I wanted to figure out how to do this....sorry for the dumb question)</li>

<li>Is there a way to flatten a morph or (equivalently) generate an image file for a morph?  The specific case I'm thinking of is where one builds up a complex image from lots of submorphs, but once done doesn't want to manipulate the submorphs anymore...just bake the thing in place.</li>

</ol></div>
</div>








</div></div></div></div>
</div>

</blockquote></div><br></div>