LK version

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LK version

Carlos Crosetti
Hi, 

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.

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.

Am I wrong?

Thanks, Carlos



_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: LK version

Robert Krahn-5
Hi Carlos –

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:

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.

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.

3. Code in modules are loaded by all worlds that implicitly require or actively load those modules.

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.

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: module('users.CarlosCrosetti.test').load() (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.

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.

Best,
Robert


On Mon, May 2, 2016 at 11:58 AM, Carlos Crosetti <[hidden email]> wrote:
Hi, 

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.

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.

Am I wrong?

Thanks, Carlos



_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel



_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel