<div dir="ltr">Hi Carlos –<div><br></div><div>It depends – code added to objects using the ObjectEditor stays indeed with the objects. So objects that are only embedded in world B will have no effect on world A. However, there are two-and-a-half ways to sharing:</div><div><br></div><div>1. PartsBin: Publish your objects in the PB and load them anywhere. This is a "pull" model, meaning that parts embedded in a world will not be automatically updated, you either have to do that manually or via a script.</div><div><br></div><div>2. You can copy'n paste objects over. Give a morph keyboard focus by clicking on it or draw a selection around one or multiple objects and press CMD-c. In another world click in the background to give the world object keyboard focus and press CMD-v.</div><div><br></div><div>3. Code in modules are loaded by all worlds that implicitly require or actively load those modules.</div><div><br></div><div>First: How do you create a module? Press CMD-b, this will open a System browser. Open a context menu in the top left pane and choose "add new file". Your own users directory is a good place to store those modules.</div><div><br></div><div>Second: Loading them: To actively load a module inside a world you can open a context menu on it in the System browser and choose "add to world requirements". To manually load a module from source code evaluate sth like: <font face="monospace, monospace">module('users.CarlosCrosetti.test').load()</font> (to load the file users/CarlosCrosetti/test.js). Auto load: When you define objects or classes in your module and store instances of those in your world they will automatically "remember" where they were defined and load their module when the world loads.</div><div><br></div><div>As you see, the system is quite flexible but also complicated. I think we will attempt to bring modules and parts together in the future.</div><div><br></div><div>Best,</div><div>Robert</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 11:58 AM, Carlos Crosetti <span dir="ltr"><<a href="mailto:carlos.crosetti@gmail.com" target="_blank">carlos.crosetti@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">Hi, <div><br></div><div>I assume as I am able to save a world A under a different name, B, , code added to B is not back ported to A automatically.</div><div><br></div><div>So if the above assumption, then worlds exhibited in the projects page do not share the same code, in the same way Smalltalk images may be different by the means of all objects inside.</div><div><br></div><div>Am I wrong?</div><div><br></div><div>Thanks, Carlos</div><div><br></div><div><br></div></div>
<br>_______________________________________________<br>
lively-kernel mailing list<br>
<a href="mailto:lively-kernel@hpi.uni-potsdam.de">lively-kernel@hpi.uni-potsdam.de</a><br>
<a href="http://email.kra.hn/c/eJxljr0KgzAAhJ9GNyWaYsyQQSoWbOtSpHWMJtFo_MGk9ufpK9KlFI7jPo6DYwQJDJgtyT5KL3FbnOu3l3Q6FgBleIDtI3_qni_p8WAsGKenpWbXHBXYu5VVVls70FOp3HrzauzthlDMAMQi8EVIRQioT8ugErhipecjBKCtSGPMZMHI8pNVSmqj3WaS7n2QzjQazWjvMv6t5CDGLS5cvZyOzwNX9kx-eL3xv_8AWydJDw" rel="noreferrer" target="_blank">http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel</a><br>
<br></blockquote></div><br></div>
<img width="1px" height="1px" alt="" src="http://email.kra.hn/o/eJwdzLsOgjAUANCvgQ3SihQ6dDASTVBZDFHHwr2UQgsEEB9fL3E54wERVZyAq8V-l16T5nFRX3pop6QiUca7oHnl78nikp6OsxMk6XlRcMujB6f3osyUsyVWauOrv2Vv3VoAjTlFoOsAWASskBsCoWScs5AxjN1RGL2g-Xgtjh2a9agH7T877Q39PIG0PuAPeFExQQ">